/*
 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include<stdio.h>
#include<stdlib.h>
#include "gtest/gtest.h"
#include "ActsAudioDecoderNdkTest.h"
#include "ADecNdkSample.h"


using namespace std;
using namespace testing::ext;
using namespace OHOS;
using namespace OHOS::Media;

namespace {
    uint32_t ES_AAC_48000_32_1[] = {283, 336, 291, 405, 438, 411, 215, 215, 313, 270,342, 641, 554, 545, 545, 546,
             541, 540, 542, 552, 537, 533, 498, 472, 445, 430, 445, 427, 414, 386, 413, 370, 380,
             401, 393, 369, 391, 367, 395, 396, 396, 385, 391, 384, 395, 392, 386, 388, 384, 379,
             376, 381, 375, 373, 349, 391, 357, 384, 395, 384, 380, 386, 372, 386, 383, 378, 385,
             385, 384, 342, 390, 379, 387, 386, 393, 397, 362, 393, 394, 391, 383, 385, 377, 379,
             381, 369, 375, 379, 346, 382, 356, 361, 366, 394, 393, 385, 362, 406, 399, 384, 377,
             385, 389, 375, 346, 396, 388, 381, 383, 352, 357, 397, 382, 395, 376, 388, 373, 374,
             353, 383, 384, 393, 379, 348, 364, 389, 380, 381, 388, 423, 392, 381, 368, 351, 391,
             355, 358, 395, 390, 385, 382, 383, 388, 388, 389, 376, 379, 376, 384, 369, 354, 390,
             389, 396, 393, 382, 385, 353, 383, 381, 377, 411, 387, 390, 377, 349, 381, 390, 378,
             373, 375, 381, 351, 392, 381, 380, 381, 378, 387, 379, 383, 348, 386, 364, 386, 371,
             399, 399, 385, 380, 355, 397, 395, 382, 380, 386, 352, 387, 390, 373, 372, 388, 378,
             385, 368, 385, 370, 378, 373, 383, 368, 373, 388, 351, 384, 391, 387, 389, 383, 355,
             361, 392, 386, 354, 394, 392, 397, 392, 352, 381, 395, 349, 383, 390, 392, 350, 393,
             393, 385, 389, 393, 382, 378, 384, 378, 375, 373, 375, 389, 377, 383, 387, 373, 344,
             388, 379, 391, 373, 384, 358, 361, 391, 394, 363, 350, 361, 395, 399, 389, 398, 375,
             398, 400, 381, 354, 363, 366, 400, 400, 356, 370, 400, 394, 398, 385, 378, 372, 354,
             359, 393, 381, 363, 396, 396, 355, 390, 356, 355, 371, 399, 367, 406, 375, 377, 405,
             401, 390, 393, 392, 384, 386, 374, 358, 397, 389, 393, 385, 345, 379, 357, 388, 356,
             381, 389, 367, 358, 391, 360, 394, 396, 357, 395, 388, 394, 383, 357, 383, 392, 394,
             376, 379, 356, 386, 395, 387, 377, 377, 389, 377, 385, 351, 387, 350, 388, 384, 345,
             358, 368, 399, 394, 385, 384, 395, 378, 387, 386, 386, 376, 375, 382, 351, 359, 356,
             401, 388, 363, 406, 363, 374, 435, 366, 400, 393, 392, 371, 391, 359, 359, 397, 388,
             390, 420, 411, 369, 384, 382, 383, 383, 375, 381, 361, 380, 348, 379, 386, 379, 379,
             386, 371, 352, 378, 378, 388, 384, 385, 352, 355, 387, 383, 379, 362, 386, 399, 376,
             390, 350, 387, 357, 403, 398, 397, 360, 351, 394, 400, 399, 393, 388, 395, 370, 377,
             395, 360, 346, 381, 370, 390, 380, 391, 387, 382, 384, 383, 354, 349, 394, 358, 387,
             400, 386, 402, 354, 396, 387, 391, 365, 377, 359, 361, 365, 395, 388, 388, 384, 388,
             378, 374, 382, 376, 377, 389, 378, 341, 390, 376, 381, 375, 414, 368, 369, 387, 411,
             396, 391, 378, 389, 349, 383, 344, 381, 387, 380, 353, 361, 391, 365, 390, 396, 382,
             386, 385, 385, 409, 387, 386, 378, 372, 372, 374, 349, 388, 389, 348, 395, 380, 382,
             388, 375, 347, 383, 359, 389, 368, 361, 405, 398, 393, 395, 359, 360, 395, 395, 362,
             354, 388, 348, 388, 386, 390, 350, 388, 356, 369, 364, 404, 404, 391, 394, 385, 439,
             432, 375, 366, 441, 362, 367, 382, 374, 346, 391, 371, 354, 376, 390, 373, 382, 385,
             389, 378, 377, 347, 414, 338, 348, 385, 352, 385, 386, 381, 388, 387, 364, 465, 405,
             443, 387, 339, 376, 337, 379, 387, 370, 374, 358, 354, 357, 393, 356, 381, 357, 407,
             361, 397, 362, 394, 394, 392, 394, 391, 381, 386, 379, 354, 351, 392, 408, 393, 389,
             388, 385, 375, 388, 375, 388, 375, 354, 384, 379, 386, 394, 383, 359, 405, 395, 352,
             345, 403, 427, 373, 380, 350, 415, 378, 434, 385, 388, 387, 400, 405, 329, 391, 356,
             419, 358, 359, 375, 367, 391, 359, 369, 361, 376, 378, 379, 348, 390, 345, 388, 390,
             406, 349, 368, 364, 391, 384, 401, 384, 391, 361, 399, 359, 386, 392, 382, 386, 380,
             383, 345, 376, 393, 400, 395, 343, 352, 354, 381, 388, 357, 393, 389, 384, 389, 388,
             384, 404, 372, 358, 381, 352, 355, 485, 393, 371, 376, 389, 377, 391, 387, 376, 342,
             390, 375, 379, 396, 376, 402, 353, 392, 382, 383, 387, 386, 372, 377, 382, 388, 381,
             387, 357, 393, 385, 346, 389, 388, 357, 362, 404, 398, 397, 402, 371, 351, 370, 362,
             350, 388, 399, 402, 406, 377, 396, 359, 372, 390, 392, 368, 383, 346, 384, 381, 379,
             367, 384, 389, 381, 371, 358, 422, 372, 382, 374, 444, 412, 369, 362, 373, 389, 401,
             383, 380, 366, 365, 361, 379, 372, 345, 382, 375, 376, 375, 382, 356, 395, 383, 384,
             391, 361, 396, 407, 365, 351, 385, 378, 403, 344, 352, 387, 397, 399, 377, 371, 381,
             415, 382, 388, 368, 383, 405, 390, 386, 384, 374, 375, 381, 371, 372, 374, 377, 346,
             358, 381, 377, 359, 385, 396, 385, 390, 389, 391, 375, 357, 389, 390, 377, 370, 379,
             351, 381, 381, 380, 371, 386, 389, 389, 383, 362, 393, 388, 355, 396, 383, 352, 384,
             352, 383, 362, 396, 385, 396, 357, 388, 382, 377, 373, 379, 383, 386, 350, 393, 355,
             380, 401, 392, 391, 402, 391, 427, 407, 394, 332, 398, 367, 373, 343, 381, 383, 386,
             382, 349, 353, 393, 378, 386, 375, 390, 356, 392, 384, 387, 380, 381, 385, 386, 383,
             378, 379, 359, 381, 382, 388, 357, 357, 397, 358, 424, 382, 352, 409, 374, 368, 365,
             399, 352, 393, 389, 385, 352, 380, 398, 389, 385, 387, 387, 353, 402, 396, 386, 357,
             395, 368, 369, 407, 394, 383, 362, 380, 385, 368, 375, 365, 379, 377, 388, 380, 346,
             383, 381, 399, 359, 386, 455, 368, 406, 377, 339, 381, 377, 373, 371, 338}; // replace of self frame length
    uint32_t ES_LEN_AAC_48000_32_1 = sizeof(ES_AAC_48000_32_1)/sizeof(uint32_t);
    map<string, int> AudioDecParam = {
        {"channel_count", 2},
        {"sample_rate", 44100},
        {"audio_sample_format", 1},
    };

    map<string, int> AudioDecErrParam = {
        {"channel_count", 44100},
        {"sample_rate", 44100},
        {"audio_sample_format", 1},
    };

    uint32_t LC_AAC_2_96000[] =
    {0, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512};
    uint32_t LC_AAC_1_96000[] =
    {0, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
        512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512};
    uint32_t LC_AAC_2_8000[] =
    {0, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
        1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536};
    uint32_t LC_AAC_1_8000[] =
    {0, 279, 279, 315, 433, 280, 257, 280, 270, 266, 334, 261, 242, 266, 274, 310, 345, 248, 248, 266, 292, 247,
        251, 260, 263, 330, 330, 245, 252, 272, 266, 280, 285, 272, 271, 346, 257, 272, 265, 268, 263, 337,
        255, 265, 276, 266, 272, 307, 271, 363, 251, 347, 232, 266, 250, 266, 254, 302, 285, 356, 264, 262,
        271, 276, 263, 303, 268, 348, 300, 242, 315, 306, 262, 235, 252, 318, 275, 250, 265, 323, 253, 263,
        254, 272, 279, 283, 287, 335, 257, 255, 257, 343, 255, 285, 265, 254, 273, 279, 283, 280, 264, 287,
        271, 256, 337, 270, 295, 261, 313, 273, 352, 252, 264, 253, 263, 260, 260, 269, 265, 312, 303, 312,
        255, 265, 281, 277, 278, 277, 255, 335, 262, 274, 294, 325, 247, 306, 236, 314, 257, 272, 264, 305,
        264, 267, 272, 341, 279, 251, 260, 285, 278, 269, 251, 362, 263, 276, 262, 276, 264, 291, 301, 279,
        267, 260, 292, 275, 258, 368, 245, 257, 264, 269, 277, 291, 282, 269, 274, 269, 263, 284, 302, 295,
        334, 269, 278, 258, 263, 260, 292, 281, 280, 255, 347, 251, 258, 272, 270, 265, 285, 263, 307, 263,
        281, 274, 311, 265, 273, 276, 277, 284, 288, 279, 270, 277, 292, 265, 264, 287, 285, 322, 260, 250,
        269, 352, 258, 267, 275, 263, 270, 273, 284, 279, 279, 285, 291, 337, 265, 305, 309, 291, 251, 241,
        252, 272, 270, 281, 319, 252, 267, 286, 320, 319, 298, 251, 284, 243, 259, 278, 282, 260, 331, 257,
        270, 322, 271, 251, 318, 246, 265, 263, 302, 269, 269, 274, 280, 286, 343, 244, 274, 251, 266, 282,
        268, 278, 277, 272, 323, 265, 287, 261, 270, 263, 301, 269, 276, 276, 283, 296, 292, 293, 298, 291,
        253, 267, 265, 295, 268, 301, 277, 347, 278, 309, 259, 315, 241, 289, 272, 297, 248, 245, 242, 264,
        288, 295, 360, 231, 296, 256, 257, 270, 267, 277, 362, 296, 231, 252, 253, 269, 307, 332, 242, 257,
        267, 271, 327, 359, 275, 269, 308, 291, 265, 259, 358, 239, 222, 246, 249, 260, 275, 267, 312, 269,
        267, 296, 345, 249, 248, 266, 271, 294, 309, 266, 263, 277, 275, 268, 309, 264, 271, 282, 275, 270,
        288, 268, 276, 280, 275, 273, 286, 264, 354, 279, 268, 261, 260, 356, 252, 242, 272, 280, 281, 307,
        252, 256, 279, 302, 275, 334, 255, 266, 285, 288, 278, 268, 266, 268, 271, 273, 274, 283, 275, 291,
        283, 308, 268, 273, 283, 342, 249, 267, 335, 310, 301, 231, 254, 249, 268, 280, 365, 231, 259, 262,
        321, 275, 244, 256, 262, 275, 341, 267, 279, 264, 310, 268, 281, 266, 287, 262, 266, 272, 282, 272,
        276, 350, 256, 332, 251, 253, 256, 294, 261, 293, 255, 322, 255, 258, 260, 351, 258, 267, 259, 259,
        277, 275, 275, 274, 274, 277, 283, 308, 285, 265, 278, 286, 307, 292, 276, 278, 277, 278, 291, 275,
        262, 273, 308, 254, 264, 259, 345, 249, 275, 265, 264, 272, 285, 274, 277, 274, 274, 287, 335, 260,
        269, 329, 324, 374, 278, 223, 238, 272, 245, 258, 317, 261, 265, 344, 308, 262, 273, 279, 268, 262,
        263, 258, 274, 269, 273, 278, 266, 277, 266, 324, 257, 258, 283, 279, 278, 289, 282, 283, 280, 272,
        280, 302, 270, 281, 279, 300, 260, 280, 279, 362, 257, 261, 263, 249, 278, 283, 265, 283, 286, 274,
        284, 274, 274, 277, 270, 257, 288, 273, 272, 286, 295, 278, 309, 284, 285, 336, 395, 229, 254, 258,
        314, 231, 245, 265, 265, 279, 278, 289, 301, 269, 254, 271, 294, 286, 263, 287, 321, 257, 263, 289,
        323, 267, 257, 280, 275, 271, 281, 282, 282, 286, 271, 266, 279, 308, 276, 318, 262, 261, 262, 339,
        260, 265, 285, 268, 263, 263, 271, 268, 281, 293, 279, 292, 266, 273, 281, 303, 289, 282, 285, 278,
        305, 262, 276, 268, 267, 269, 296, 272, 280, 264, 329, 312, 269, 250, 279, 251, 272, 293, 349, 238,
        281, 255, 324, 260, 275, 265, 271, 266, 288, 272, 275, 273, 294, 292, 308, 342, 267, 238, 275, 250,
        243, 356, 262, 260, 267, 274, 279, 261, 280, 289, 288, 342, 250, 256, 270, 267, 299, 323, 268, 289,
        255, 275, 271, 273, 265, 284, 272, 281, 275, 354, 252, 290, 262, 278, 254, 272, 255, 355, 259, 260,
        257, 282, 277, 267, 271, 358, 251, 266, 275, 260, 276, 276, 288, 277, 275, 278, 283, 278, 278, 285,
        273, 288, 283, 264, 306, 271, 291, 283, 317, 270, 270, 273, 279, 266, 269, 297, 310, 290, 279, 264};
    uint32_t LC_AAC_1_11025[] =
    {0, 279, 279, 324, 320, 436, 260, 245, 245, 267, 270, 269, 283, 342, 270, 258, 274, 272, 287, 272, 268,
        362, 255, 258, 251, 276, 281, 286, 261, 273, 275, 282, 286, 260, 299, 332, 261, 272, 260, 271, 353,
        249, 285, 300, 251, 252, 252, 256, 354, 257, 255, 261, 284, 285, 261, 283, 332, 263, 271, 268, 265,
        274, 278, 281, 299, 273, 283, 343, 254, 309, 318, 241, 268, 257, 253, 279, 263, 322, 248, 273, 345,
        251, 278, 273, 282, 275, 297, 272, 312, 260, 286, 325, 318, 292, 263, 231, 318, 296, 252, 233, 265,
        266, 263, 353, 251, 259, 270, 275, 290, 266, 277, 265, 258, 327, 262, 256, 283, 283, 272, 363, 260,
        248, 262, 261, 320, 257, 275, 280, 264, 280, 267, 285, 294, 278, 283, 281, 286, 279, 282, 331, 262,
        264, 342, 244, 262, 285, 271, 260, 302, 271, 275, 310, 267, 268, 288, 266, 263, 270, 258, 267, 275,
        268, 267, 295, 331, 300, 301, 267, 267, 281, 289, 282, 290, 268, 267, 269, 275, 342, 262, 280, 267,
        261, 269, 292, 271, 303, 255, 261, 332, 253, 271, 263, 273, 300, 265, 277, 264, 284, 306, 337, 273,
        257, 258, 272, 274, 339, 259, 257, 249, 256, 356, 267, 265, 291, 265, 312, 251, 271, 290, 270, 299,
        277, 271, 272, 270, 339, 275, 261, 336, 237, 252, 257, 290, 271, 270, 267, 280, 355, 254, 272, 287,
        263, 283, 262, 274, 259, 281, 329, 270, 276, 322, 263, 273, 275, 271, 273, 276, 270, 277, 283, 271,
        269, 267, 268, 357, 258, 258, 268, 278, 277, 267, 275, 296, 270, 289, 278, 272, 270, 283, 284, 338,
        257, 266, 279, 278, 268, 283, 281, 264, 289, 280, 299, 271, 268, 296, 274, 295, 262, 275, 271, 285,
        304, 287, 265, 258, 277, 273, 341, 255, 250, 278, 271, 269, 290, 266, 291, 281, 289, 281, 272, 288,
        300, 289, 321, 251, 274, 311, 297, 315, 277, 255, 248, 255, 253, 275, 258, 263, 281, 302, 315, 264,
        271, 260, 302, 395, 273, 270, 297, 227, 254, 310, 223, 248, 271, 270, 288, 278, 301, 334, 249, 255,
        332, 247, 261, 263, 281, 332, 251, 276, 274, 260, 282, 286, 267, 271, 282, 285, 287, 292, 264, 320,
        250, 283, 248, 259, 280, 291, 265, 328, 257, 274, 280, 277, 332, 262, 266, 272, 282, 279, 275, 277,
        271, 288, 281, 283, 277, 272, 282, 271, 324, 280, 268, 316, 283, 295, 259, 276, 286, 304, 260, 293,
        270, 262, 292, 270, 318, 271, 263, 288, 247, 288, 293, 265, 288, 253, 280, 288, 269, 266, 265, 260,
        277, 266, 280, 298, 280, 367, 245, 320, 247, 257, 268, 270, 269, 275, 282, 281, 331, 288, 254, 264,
        270, 261, 273, 273, 333, 290, 264, 256, 263, 277, 281, 268, 298, 319, 301, 282, 326, 300, 310, 270,
        281, 250, 265, 287, 267, 252, 254, 270, 260, 277, 260, 280, 279, 268, 300, 290, 272, 300, 289, 317,
        317, 231, 247, 273, 278, 279, 263, 298, 300, 260, 253, 273, 298, 282, 279, 280, 334, 252, 286, 264,
        264, 272, 260, 262, 281, 300, 264, 270, 280, 288, 278, 273, 295, 278, 263, 282, 358, 262, 272, 261,
        280, 254, 319, 261, 275, 264, 280, 286, 292, 284, 310, 278, 250, 263, 261, 288, 328, 281, 279, 319,
        250, 247, 257, 261, 294, 276, 300, 278, 272, 265, 266, 264, 323, 274, 271, 320, 273, 261, 304, 293,
        256, 301, 252, 274, 270, 285, 335, 268, 256, 277, 270, 307, 255, 282, 335, 251, 264, 275, 287, 290,
        264, 265, 373, 250, 246, 307, 249, 334, 254, 262, 244, 258, 263, 265, 279, 324, 288, 258, 299, 259,
        264, 295, 271, 315, 266, 265, 319, 259, 271, 308, 259, 303, 291, 278, 278, 245, 333, 259, 264, 306,
        289, 242, 245, 297, 283, 327, 251, 273, 319, 244, 290, 260, 262, 247, 272, 289, 293, 256, 265, 277,
        276, 272, 275, 273, 277, 294, 291, 269, 264, 264, 277, 283, 319, 292, 272, 273, 269, 292, 291, 291,
        282, 271, 278, 284, 273, 294, 265, 281, 258, 272, 279, 275, 276, 298, 282, 273, 276, 266, 302, 316,
        261, 274, 256, 274, 305, 270, 264, 278, 267, 308, 267, 271, 279, 284, 285, 290, 273, 268, 284, 359,
        330, 277, 292, 307, 229, 235, 246, 269, 272, 267, 279, 313, 265, 267, 261, 286, 311, 268, 272, 266,
        280, 278, 298, 261, 267, 289, 283, 282, 279, 271, 278, 282, 276, 278, 274, 272, 273, 277, 307, 274,
        277, 280, 290, 290, 279, 282, 267, 281, 278, 284, 275, 279, 289, 276, 289, 275, 274, 282, 265, 304};
    uint32_t LC_AAC_2_11025[] =
    {0, 372, 372, 418, 415, 558, 380, 385, 386, 401, 388, 381, 382, 453, 357, 350, 352, 377, 355, 361, 378,
        447, 359, 363, 387, 367, 346, 369, 353, 358, 371, 371, 369, 371, 396, 421, 344, 368, 359, 363, 467,
        338, 370, 384, 336, 348, 347, 360, 442, 332, 354, 359, 369, 350, 362, 370, 415, 354, 380, 383, 363,
        352, 354, 367, 380, 363, 384, 428, 365, 396, 427, 343, 359, 344, 346, 371, 367, 407, 366, 364, 445,
        347, 365, 341, 362, 368, 390, 361, 403, 357, 361, 448, 446, 394, 368, 349, 415, 403, 327, 327, 342,
        349, 348, 429, 347, 352, 354, 358, 385, 355, 362, 361, 352, 405, 361, 364, 358, 361, 356, 446, 373,
        350, 362, 351, 423, 356, 376, 376, 350, 364, 355, 364, 371, 361, 360, 365, 368, 381, 386, 421, 361,
        353, 462, 344, 353, 383, 368, 355, 398, 366, 377, 398, 360, 362, 385, 355, 363, 354, 344, 358, 368,
        360, 365, 375, 415, 389, 387, 365, 369, 359, 375, 382, 389, 363, 367, 370, 368, 439, 374, 367, 370,
        362, 361, 387, 358, 394, 353, 370, 420, 357, 364, 377, 362, 381, 366, 369, 357, 367, 384, 440, 376,
        344, 362, 358, 364, 426, 364, 347, 338, 351, 435, 359, 358, 382, 355, 396, 353, 356, 372, 352, 375,
        358, 364, 376, 372, 426, 380, 348, 451, 326, 348, 365, 374, 380, 361, 358, 366, 447, 356, 363, 390,
        352, 366, 374, 364, 346, 368, 407, 357, 374, 429, 358, 358, 368, 367, 366, 366, 354, 361, 373, 372,
        364, 370, 358, 446, 360, 362, 360, 345, 375, 367, 364, 375, 374, 391, 353, 378, 352, 379, 365, 435,
        365, 353, 363, 376, 363, 368, 383, 366, 367, 360, 387, 350, 370, 395, 379, 365, 385, 351, 362, 383,
        394, 398, 360, 353, 383, 354, 443, 357, 362, 367, 380, 370, 385, 365, 376, 383, 376, 375, 377, 383,
        383, 390, 406, 357, 369, 396, 388, 410, 376, 361, 337, 349, 363, 352, 354, 362, 362, 390, 409, 358,
        368, 353, 375, 488, 387, 383, 407, 336, 345, 390, 327, 336, 341, 345, 363, 357, 378, 439, 339, 355,
        430, 355, 340, 363, 357, 424, 341, 342, 377, 350, 366, 389, 356, 362, 374, 355, 374, 378, 362, 411,
        356, 384, 359, 352, 360, 370, 359, 418, 368, 355, 361, 365, 431, 359, 367, 376, 376, 380, 378, 379,
        375, 375, 382, 386, 381, 362, 383, 361, 404, 368, 369, 410, 374, 390, 360, 371, 373, 389, 356, 389,
        354, 365, 379, 365, 407, 342, 340, 377, 345, 383, 392, 361, 370, 355, 363, 387, 380, 348, 358, 360,
        351, 362, 368, 371, 358, 482, 353, 418, 352, 352, 363, 351, 355, 363, 362, 373, 437, 356, 375, 362,
        357, 380, 372, 366, 410, 382, 352, 377, 358, 367, 367, 363, 368, 425, 409, 395, 427, 384, 414, 377,
        389, 338, 347, 385, 366, 347, 337, 354, 366, 374, 359, 364, 362, 364, 376, 379, 354, 389, 370, 406,
        433, 356, 358, 350, 370, 362, 356, 391, 408, 344, 338, 348, 373, 381, 351, 361, 435, 346, 376, 341,
        361, 367, 356, 364, 366, 386, 355, 363, 370, 386, 361, 358, 380, 373, 368, 378, 454, 363, 370, 352,
        369, 346, 407, 359, 347, 364, 374, 367, 387, 377, 418, 391, 353, 363, 362, 365, 430, 378, 378, 413,
        354, 333, 357, 341, 382, 350, 376, 367, 352, 367, 371, 373, 392, 367, 372, 433, 366, 350, 393, 396,
        360, 386, 356, 367, 355, 364, 438, 363, 360, 369, 357, 406, 345, 365, 450, 352, 350, 352, 381, 383,
        335, 357, 488, 358, 354, 403, 338, 413, 343, 348, 360, 346, 369, 364, 371, 392, 377, 364, 376, 354,
        367, 367, 375, 414, 359, 360, 398, 373, 366, 388, 354, 378, 392, 379, 376, 351, 425, 349, 350, 385,
        385, 339, 354, 380, 378, 420, 349, 366, 418, 347, 401, 345, 352, 356, 350, 392, 381, 356, 356, 360,
        363, 360, 354, 358, 370, 363, 374, 364, 368, 362, 370, 366, 390, 378, 376, 374, 367, 380, 379, 385,
        384, 364, 369, 367, 375, 385, 358, 369, 362, 369, 360, 365, 367, 388, 361, 361, 363, 366, 391, 405,
        365, 377, 366, 367, 386, 367, 367, 371, 364, 387, 371, 360, 381, 369, 366, 384, 375, 369, 382, 435,
        436, 378, 408, 415, 338, 347, 347, 358, 361, 358, 346, 382, 352, 344, 361, 361, 394, 354, 350, 351,
        363, 361, 392, 362, 367, 382, 363, 376, 382, 362, 374, 382, 375, 369, 373, 370, 364, 374, 395, 374,
        375, 374, 373, 366, 375, 383, 376, 374, 382, 387, 373, 354, 374, 373, 375, 370, 375, 378, 365, 382};
    uint32_t LC_AAC_1_12000[] =
    {0, 279, 279, 330, 328, 373, 290, 266, 267, 260, 290, 266, 278, 287, 314, 255, 264, 271, 280, 282, 288,
        266, 343, 330, 229, 242, 252, 250, 265, 299, 272, 272, 277, 297, 285, 274, 270, 309, 296, 258, 272,
        282, 268, 329, 252, 269, 327, 244, 271, 266, 271, 264, 358, 258, 257, 260, 276, 274, 286, 272, 279,
        339, 261, 272, 265, 283, 272, 272, 271, 263, 282, 270, 322, 290, 285, 317, 312, 242, 276, 252, 272,
        290, 257, 255, 345, 254, 254, 340, 264, 254, 260, 271, 279, 315, 281, 273, 308, 249, 258, 363, 324,
        295, 261, 239, 303, 303, 234, 254, 242, 276, 274, 266, 349, 252, 263, 271, 266, 278, 339, 262, 254,
        260, 249, 279, 282, 285, 285, 276, 283, 356, 276, 256, 256, 295, 258, 335, 269, 272, 270, 265, 302,
        255, 269, 280, 282, 278, 279, 270, 289, 268, 286, 350, 277, 263, 245, 362, 248, 243, 345, 253, 241,
        299, 276, 257, 337, 257, 272, 271, 277, 283, 269, 258, 272, 269, 267, 255, 266, 266, 365, 273, 282,
        288, 276, 275, 282, 277, 284, 300, 279, 266, 264, 265, 330, 350, 263, 278, 243, 305, 257, 275, 256,
        261, 271, 256, 294, 319, 267, 265, 277, 267, 292, 264, 278, 261, 311, 294, 325, 320, 278, 246, 264,
        272, 296, 317, 258, 288, 233, 257, 328, 255, 255, 261, 276, 297, 289, 265, 272, 266, 280, 273, 263,
        264, 278, 272, 308, 352, 278, 260, 318, 247, 281, 256, 271, 274, 272, 276, 274, 318, 325, 255, 263,
        284, 260, 279, 255, 258, 268, 269, 325, 300, 281, 286, 335, 257, 272, 280, 270, 264, 264, 266, 284,
        275, 277, 278, 282, 252, 270, 343, 269, 255, 278, 277, 266, 278, 267, 297, 276, 279, 257, 300, 278,
        266, 280, 273, 279, 306, 273, 284, 274, 275, 283, 270, 278, 287, 291, 278, 280, 280, 270, 291, 277,
        272, 290, 267, 286, 330, 283, 283, 291, 260, 258, 257, 257, 299, 335, 250, 254, 270, 273, 284, 276,
        288, 285, 275, 287, 279, 275, 292, 289, 297, 286, 332, 267, 270, 312, 300, 291, 308, 279, 279, 249,
        229, 255, 259, 251, 256, 275, 281, 356, 277, 272, 269, 267, 309, 378, 280, 279, 272, 253, 235, 295,
        249, 251, 255, 264, 257, 282, 285, 275, 333, 254, 274, 315, 335, 239, 269, 260, 270, 300, 260, 269,
        274, 278, 311, 318, 305, 238, 293, 261, 261, 292, 295, 275, 332, 227, 251, 266, 260, 263, 263, 289,
        270, 333, 265, 267, 272, 295, 268, 346, 252, 264, 270, 279, 277, 273, 278, 273, 276, 279, 271, 287,
        281, 275, 272, 291, 325, 267, 272, 304, 296, 259, 297, 258, 296, 298, 308, 266, 298, 248, 277, 315,
        275, 241, 303, 265, 278, 261, 255, 329, 266, 263, 276, 273, 277, 280, 278, 267, 274, 260, 264, 269,
        263, 283, 295, 275, 282, 353, 319, 254, 260, 272, 274, 262, 266, 269, 287, 269, 345, 256, 275, 272,
        278, 264, 271, 282, 278, 325, 298, 255, 261, 256, 256, 274, 276, 291, 314, 351, 258, 285, 288, 263,
        327, 293, 274, 271, 264, 268, 297, 257, 247, 256, 268, 278, 284, 270, 271, 276, 269, 272, 314, 266,
        273, 308, 268, 295, 330, 250, 266, 258, 278, 365, 235, 264, 334, 246, 252, 267, 265, 301, 297, 278,
        271, 329, 234, 261, 320, 255, 265, 277, 270, 279, 279, 300, 258, 272, 276, 271, 282, 272, 270, 302,
        276, 269, 278, 340, 262, 278, 254, 265, 271, 263, 349, 265, 288, 262, 284, 265, 306, 283, 289, 294,
        256, 261, 277, 266, 273, 359, 276, 258, 310, 245, 263, 272, 253, 299, 317, 259, 298, 265, 264, 268,
        258, 268, 306, 310, 269, 294, 307, 247, 261, 334, 308, 251, 287, 234, 258, 274, 263, 333, 323, 256,
        253, 293, 264, 303, 255, 254, 300, 300, 257, 268, 279, 311, 283, 263, 258, 362, 248, 243, 271, 254,
        292, 329, 245, 262, 256, 258, 277, 280, 278, 281, 332, 266, 313, 267, 258, 278, 275, 275, 312, 268,
        261, 322, 267, 270, 295, 258, 308, 314, 293, 274, 264, 265, 325, 260, 260, 323, 332, 227, 234, 250,
        322, 306, 308, 269, 242, 314, 237, 271, 270, 276, 268, 259, 264, 314, 283, 250, 250, 262, 265, 270,
        289, 279, 286, 271, 293, 293, 274, 266, 275, 270, 279, 312, 279, 274, 270, 276, 271, 291, 297, 279,
        298, 268, 273, 279, 271, 285, 300, 271, 301, 259, 271, 263, 269, 283, 302, 270, 268, 278, 278, 270,
        320, 285, 265, 262, 279, 273, 300, 271, 282, 271, 269, 274, 304, 267, 283, 282, 266, 273, 315, 270};
    uint32_t LC_AAC_2_12000[] =
    {0, 372, 372, 424, 417, 433, 474, 385, 393, 398, 398, 381, 397, 396, 432, 343, 344, 359, 353, 363, 372,
        374, 422, 431, 342, 374, 359, 360, 332, 374, 347, 366, 366, 387, 374, 360, 384, 394, 380, 363, 359,
        361, 390, 416, 386, 347, 399, 346, 360, 364, 351, 362, 444, 349, 343, 358, 351, 348, 366, 368, 384,
        433, 356, 364, 380, 382, 365, 350, 368, 368, 373, 362, 410, 389, 369, 418, 425, 338, 372, 340, 344,
        405, 347, 357, 456, 359, 373, 429, 342, 348, 322, 358, 379, 390, 357, 360, 396, 349, 367, 442, 442,
        385, 355, 342, 422, 406, 341, 349, 340, 351, 343, 350, 425, 349, 363, 353, 361, 350, 411, 363, 349,
        362, 349, 361, 367, 374, 372, 371, 356, 443, 370, 362, 352, 416, 343, 431, 374, 358, 380, 353, 393,
        348, 355, 352, 360, 359, 362, 359, 366, 374, 382, 445, 395, 353, 360, 472, 333, 348, 436, 351, 369,
        386, 356, 343, 434, 356, 360, 359, 378, 368, 360, 354, 353, 363, 356, 358, 351, 362, 433, 362, 368,
        373, 362, 376, 368, 361, 375, 386, 366, 375, 366, 375, 410, 459, 371, 367, 350, 423, 368, 377, 357,
        341, 363, 353, 371, 394, 368, 374, 369, 373, 387, 357, 361, 348, 390, 405, 412, 415, 376, 353, 357,
        360, 383, 425, 342, 374, 319, 353, 415, 341, 355, 344, 376, 381, 387, 352, 347, 343, 361, 353, 349,
        364, 364, 368, 373, 448, 382, 347, 432, 344, 371, 352, 362, 377, 365, 360, 366, 400, 429, 356, 355,
        381, 360, 374, 372, 358, 359, 377, 410, 388, 360, 377, 429, 358, 357, 368, 355, 365, 358, 357, 365,
        356, 365, 371, 370, 369, 359, 442, 356, 364, 364, 368, 359, 363, 365, 378, 355, 375, 379, 399, 365,
        354, 372, 372, 361, 401, 372, 366, 374, 370, 374, 366, 373, 367, 372, 360, 370, 367, 353, 385, 366,
        384, 370, 388, 365, 425, 393, 371, 415, 348, 356, 353, 357, 378, 446, 369, 356, 376, 364, 372, 377,
        379, 370, 362, 367, 376, 383, 385, 389, 397, 369, 433, 376, 373, 410, 399, 388, 401, 377, 380, 357,
        337, 331, 347, 346, 348, 351, 353, 425, 383, 355, 358, 359, 411, 488, 384, 373, 392, 344, 327, 387,
        341, 338, 339, 331, 342, 357, 352, 354, 437, 346, 355, 398, 434, 358, 354, 374, 350, 391, 343, 359,
        344, 376, 390, 420, 419, 350, 382, 358, 356, 370, 382, 358, 419, 351, 347, 353, 377, 366, 356, 365,
        350, 401, 369, 356, 359, 398, 366, 446, 359, 368, 370, 370, 381, 370, 369, 375, 385, 368, 375, 368,
        383, 363, 361, 369, 406, 374, 367, 393, 388, 352, 394, 348, 386, 383, 392, 365, 397, 353, 357, 421,
        373, 334, 386, 354, 365, 340, 334, 435, 352, 362, 362, 354, 363, 378, 373, 351, 355, 363, 365, 358,
        356, 376, 377, 358, 379, 454, 412, 348, 353, 358, 362, 350, 360, 363, 371, 363, 451, 339, 345, 383,
        352, 392, 383, 395, 371, 415, 399, 349, 353, 363, 354, 381, 386, 360, 388, 451, 369, 372, 391, 349,
        415, 390, 371, 357, 359, 344, 388, 361, 341, 346, 372, 367, 383, 365, 367, 370, 368, 348, 411, 364,
        354, 398, 356, 394, 434, 357, 368, 345, 360, 453, 329, 345, 446, 323, 360, 336, 351, 379, 384, 361,
        364, 440, 342, 355, 421, 329, 351, 359, 376, 373, 362, 379, 356, 368, 353, 360, 375, 352, 364, 381,
        381, 370, 367, 453, 361, 362, 362, 360, 356, 358, 447, 358, 361, 361, 371, 353, 392, 383, 369, 412,
        343, 366, 369, 371, 359, 436, 369, 368, 421, 350, 346, 355, 352, 376, 412, 369, 387, 347, 343, 370,
        355, 363, 397, 410, 357, 384, 426, 354, 357, 425, 386, 366, 379, 345, 344, 377, 346, 419, 421, 339,
        358, 379, 344, 386, 346, 351, 382, 397, 355, 371, 358, 396, 372, 349, 351, 473, 347, 349, 356, 345,
        374, 431, 347, 334, 395, 374, 376, 376, 381, 362, 407, 362, 384, 343, 364, 355, 349, 385, 394, 359,
        374, 394, 356, 394, 379, 360, 394, 387, 391, 378, 371, 352, 419, 351, 350, 421, 445, 328, 338, 343,
        398, 401, 406, 378, 358, 412, 347, 349, 348, 349, 343, 349, 366, 391, 377, 344, 342, 353, 363, 354,
        369, 379, 366, 361, 374, 382, 375, 366, 371, 373, 367, 393, 370, 372, 367, 366, 370, 385, 375, 370,
        381, 367, 365, 363, 369, 374, 381, 372, 396, 365, 374, 366, 363, 364, 393, 369, 369, 369, 358, 378,
        399, 384, 356, 361, 379, 356, 390, 365, 362, 369, 362, 369, 393, 373, 378, 369, 354, 358, 416, 367};
    uint32_t LC_AAC_1_16000[] =
    {0, 279, 279, 343, 338, 311, 320, 291, 242, 270, 273, 257, 279, 301, 274, 303, 290, 299, 309, 238, 249,
        260, 269, 279, 274, 280, 287, 295, 281, 321, 327, 244, 262, 261, 269, 262, 274, 288, 297, 258, 279,
        275, 276, 277, 274, 281, 286, 271, 293, 322, 251, 259, 279, 279, 280, 278, 285, 333, 271, 266, 269,
        325, 261, 268, 261, 263, 265, 269, 308, 336, 266, 257, 263, 276, 276, 276, 260, 269, 280, 279, 328,
        285, 269, 275, 269, 285, 287, 279, 268, 266, 273, 283, 304, 271, 287, 286, 333, 267, 265, 264, 324,
        245, 253, 264, 294, 271, 269, 268, 305, 268, 260, 329, 263, 266, 274, 313, 297, 272, 270, 269, 271,
        271, 287, 294, 273, 266, 272, 310, 267, 272, 262, 347, 335, 330, 279, 283, 231, 238, 317, 305, 243,
        229, 278, 273, 261, 270, 271, 260, 303, 333, 265, 270, 272, 262, 263, 280, 316, 272, 283, 268, 266,
        270, 283, 319, 265, 277, 277, 271, 278, 278, 278, 279, 333, 280, 269, 257, 329, 259, 254, 291, 256,
        285, 276, 279, 282, 262, 292, 259, 261, 280, 282, 276, 275, 275, 276, 267, 274, 289, 281, 285, 349,
        299, 263, 252, 264, 338, 277, 252, 268, 256, 334, 261, 252, 288, 296, 281, 270, 271, 274, 274, 281,
        287, 278, 270, 276, 278, 268, 281, 277, 263, 290, 277, 291, 259, 288, 292, 345, 280, 266, 290, 264,
        285, 268, 276, 265, 281, 275, 271, 291, 277, 278, 284, 286, 268, 269, 271, 333, 258, 278, 276, 271,
        264, 359, 238, 266, 262, 268, 267, 347, 262, 261, 264, 355, 261, 278, 265, 268, 270, 286, 269, 282,
        266, 279, 269, 300, 336, 283, 269, 311, 248, 257, 268, 265, 285, 277, 313, 329, 254, 274, 251, 268,
        261, 269, 347, 253, 266, 271, 254, 275, 281, 275, 293, 264, 250, 280, 271, 275, 291, 283, 282, 280,
        276, 276, 279, 281, 315, 324, 260, 257, 277, 251, 345, 277, 255, 273, 255, 296, 269, 274, 268, 316,
        261, 306, 324, 266, 260, 274, 278, 272, 283, 272, 272, 272, 270, 277, 269, 308, 357, 286, 266, 266,
        260, 320, 257, 255, 266, 265, 281, 274, 274, 274, 283, 264, 273, 285, 291, 282, 275, 301, 262, 266,
        357, 313, 233, 272, 262, 269, 270, 275, 291, 276, 261, 269, 288, 281, 273, 261, 254, 357, 266, 273,
        261, 273, 262, 295, 297, 305, 272, 256, 269, 290, 283, 295, 285, 253, 279, 281, 283, 293, 271, 273,
        291, 270, 281, 265, 311, 264, 276, 259, 355, 256, 266, 256, 284, 307, 259, 285, 294, 268, 268, 268,
        270, 265, 273, 324, 300, 262, 268, 269, 277, 287, 268, 284, 277, 281, 276, 289, 283, 284, 274, 286,
        281, 303, 275, 290, 276, 274, 313, 314, 250, 271, 287, 282, 279, 273, 291, 283, 258, 268, 269, 261,
        275, 265, 267, 280, 273, 280, 288, 277, 287, 300, 276, 275, 274, 283, 288, 328, 243, 270, 321, 250,
        273, 290, 291, 267, 257, 337, 251, 255, 271, 253, 270, 274, 279, 263, 293, 270, 274, 291, 265, 273,
        335, 284, 289, 273, 268, 270, 275, 285, 267, 308, 266, 270, 274, 284, 285, 281, 305, 292, 289, 259,
        278, 285, 266, 270, 262, 295, 303, 281, 265, 330, 260, 261, 292, 262, 281, 262, 275, 273, 281, 312,
        261, 286, 276, 267, 266, 268, 351, 262, 294, 320, 235, 265, 262, 275, 269, 284, 281, 273, 279, 273,
        279, 275, 275, 290, 280, 273, 277, 284, 278, 266, 282, 292, 331, 253, 293, 296, 307, 262, 268, 287,
        282, 273, 285, 286, 328, 286, 247, 300, 250, 278, 257, 270, 327, 269, 233, 297, 271, 274, 267, 287,
        256, 272, 337, 282, 257, 280, 257, 253, 276, 312, 274, 284, 266, 267, 282, 276, 283, 271, 270, 271,
        274, 295, 303, 263, 260, 271, 362, 292, 266, 271, 276, 265, 269, 269, 284, 273, 265, 284, 267, 274,
        275, 353, 263, 261, 279, 284, 280, 275, 280, 268, 277, 279, 320, 314, 282, 317, 253, 252, 253, 254,
        262, 270, 268, 282, 315, 309, 327, 289, 243, 284, 286, 284, 270, 320, 277, 241, 267, 275, 268, 275,
        275, 288, 263, 285, 263, 273, 284, 287, 277, 277, 288, 279, 266, 274, 275, 268, 277, 302, 277, 268,
        275, 331, 284, 253, 293, 317, 245, 261, 272, 258, 272, 285, 290, 262, 274, 285, 330, 259, 265, 261,
        273, 277, 299, 307, 306, 267, 259, 342, 296, 246, 255, 310, 291, 256, 265, 264, 263, 284, 267, 285,
        292, 276, 266, 272, 281, 271, 276, 297, 278, 296, 261, 264, 286, 279, 279, 273, 281, 337, 259, 274};
    uint32_t LC_AAC_2_16000[] =
    {0, 372, 372, 433, 428, 416, 410, 439, 393, 384, 366, 363, 373, 370, 389, 392, 392, 417, 427, 337, 353,
        364, 355, 357, 369, 365, 369, 366, 379, 426, 420, 350, 354, 376, 379, 359, 357, 369, 373, 363, 358,
        379, 373, 370, 357, 373, 379, 367, 381, 421, 344, 361, 363, 382, 369, 368, 372, 419, 370, 367, 385,
        397, 353, 355, 359, 351, 361, 361, 404, 443, 370, 353, 352, 367, 366, 369, 367, 364, 373, 365, 412,
        382, 359, 378, 350, 367, 376, 372, 367, 355, 369, 377, 386, 361, 376, 374, 430, 364, 364, 354, 440,
        345, 337, 350, 386, 358, 361, 371, 386, 347, 366, 403, 368, 380, 371, 387, 374, 362, 346, 369, 340,
        359, 373, 389, 375, 360, 366, 402, 376, 369, 375, 441, 437, 428, 397, 386, 351, 338, 408, 408, 345,
        315, 342, 352, 336, 357, 343, 353, 388, 416, 344, 355, 372, 352, 348, 353, 410, 363, 368, 353, 352,
        369, 398, 413, 371, 362, 360, 370, 370, 362, 373, 375, 417, 372, 360, 349, 441, 362, 342, 392, 345,
        372, 382, 380, 373, 370, 368, 356, 361, 370, 365, 371, 369, 357, 361, 358, 362, 365, 366, 379, 465,
        401, 363, 357, 361, 445, 384, 342, 358, 349, 421, 362, 354, 366, 382, 371, 353, 378, 362, 353, 370,
        363, 359, 352, 354, 353, 361, 363, 384, 374, 389, 385, 375, 361, 388, 388, 440, 378, 358, 411, 349,
        433, 345, 353, 352, 379, 362, 365, 367, 352, 371, 370, 368, 374, 367, 376, 431, 363, 373, 361, 353,
        351, 441, 344, 380, 351, 364, 360, 451, 343, 366, 348, 454, 350, 365, 368, 358, 365, 386, 349, 373,
        371, 366, 346, 395, 445, 386, 360, 421, 338, 350, 379, 369, 357, 362, 390, 444, 347, 368, 354, 360,
        336, 356, 438, 347, 364, 376, 358, 362, 363, 379, 380, 369, 359, 363, 345, 349, 362, 365, 360, 367,
        366, 365, 357, 355, 422, 421, 361, 350, 374, 359, 444, 365, 366, 364, 354, 370, 363, 359, 354, 422,
        370, 397, 424, 358, 352, 356, 360, 357, 362, 370, 371, 375, 378, 364, 360, 403, 458, 403, 374, 360,
        361, 426, 342, 338, 338, 350, 356, 353, 359, 359, 366, 369, 369, 354, 371, 374, 375, 391, 373, 360,
        415, 447, 369, 361, 361, 356, 371, 360, 374, 371, 353, 361, 389, 353, 371, 361, 345, 459, 367, 363,
        342, 377, 379, 370, 383, 416, 382, 347, 345, 369, 368, 372, 393, 370, 379, 366, 390, 370, 372, 357,
        401, 355, 356, 359, 405, 343, 376, 360, 454, 368, 356, 345, 383, 412, 356, 371, 400, 364, 366, 365,
        375, 362, 341, 452, 383, 358, 366, 364, 376, 381, 363, 379, 380, 368, 360, 370, 376, 379, 371, 371,
        378, 384, 371, 392, 367, 368, 407, 409, 373, 380, 363, 366, 361, 355, 370, 360, 359, 361, 342, 362,
        360, 352, 353, 368, 361, 359, 385, 379, 379, 398, 383, 372, 378, 362, 361, 451, 348, 359, 429, 325,
        348, 401, 383, 369, 357, 423, 351, 367, 376, 352, 344, 354, 363, 362, 355, 357, 350, 388, 355, 358,
        416, 372, 392, 370, 362, 358, 375, 380, 366, 416, 343, 372, 362, 357, 372, 370, 404, 407, 397, 359,
        367, 369, 366, 374, 363, 373, 397, 363, 346, 443, 339, 346, 390, 351, 368, 370, 366, 377, 367, 399,
        376, 369, 354, 373, 349, 378, 452, 363, 396, 425, 339, 370, 360, 376, 378, 361, 377, 359, 373, 366,
        369, 378, 376, 375, 372, 364, 375, 366, 371, 374, 372, 381, 409, 361, 379, 379, 400, 368, 350, 377,
        391, 363, 388, 378, 422, 402, 356, 386, 359, 355, 348, 353, 406, 370, 341, 386, 347, 351, 351, 372,
        350, 356, 428, 364, 361, 374, 349, 341, 363, 382, 352, 362, 348, 365, 365, 374, 371, 367, 371, 363,
        369, 381, 387, 360, 363, 354, 464, 388, 356, 356, 343, 366, 361, 354, 355, 350, 365, 373, 366, 367,
        367, 447, 360, 365, 388, 385, 375, 369, 380, 381, 382, 378, 405, 415, 394, 431, 350, 361, 361, 362,
        364, 364, 367, 377, 398, 388, 422, 402, 356, 359, 382, 366, 344, 425, 361, 347, 351, 355, 345, 346,
        345, 379, 372, 374, 362, 356, 384, 388, 372, 387, 377, 373, 367, 366, 380, 369, 373, 405, 366, 370,
        369, 400, 386, 338, 383, 428, 353, 373, 362, 352, 357, 384, 370, 353, 354, 373, 427, 355, 369, 359,
        359, 360, 386, 404, 387, 369, 361, 430, 378, 330, 354, 402, 391, 330, 337, 343, 356, 369, 377, 365,
        383, 361, 362, 376, 375, 356, 371, 382, 357, 382, 352, 358, 382, 373, 372, 369, 375, 449, 366, 365};
    uint32_t LC_AAC_1_22050[] =
    {0, 279, 279, 363, 332, 328, 308, 276, 379, 237, 212, 254, 266, 285, 274, 280, 282, 286, 272, 277, 283,
        267, 271, 307, 324, 239, 249, 284, 277, 271, 281, 283, 284, 278, 275, 278, 281, 275, 271, 290, 336,
        267, 269, 265, 263, 289, 280, 277, 274, 270, 279, 288, 269, 276, 279, 277, 291, 279, 278, 284, 280,
        269, 288, 290, 270, 278, 289, 335, 232, 259, 268, 276, 284, 284, 283, 288, 292, 295, 306, 247, 267,
        260, 274, 338, 241, 264, 274, 281, 274, 274, 271, 288, 271, 302, 343, 258, 260, 271, 261, 270, 269,
        274, 300, 271, 273, 275, 268, 281, 276, 289, 356, 254, 267, 276, 273, 272, 280, 276, 280, 267, 284,
        284, 277, 266, 283, 278, 299, 319, 290, 242, 294, 336, 292, 246, 256, 265, 262, 336, 252, 261, 265,
        276, 275, 265, 276, 272, 280, 274, 309, 275, 273, 271, 276, 356, 263, 265, 268, 278, 305, 264, 274,
        272, 278, 263, 271, 276, 279, 270, 271, 308, 283, 274, 306, 275, 266, 293, 303, 265, 266, 305, 323,
        335, 324, 275, 291, 256, 256, 232, 287, 257, 318, 289, 246, 240, 264, 279, 257, 275, 292, 270, 279,
        285, 273, 287, 333, 260, 273, 275, 282, 272, 275, 278, 269, 281, 310, 308, 275, 281, 275, 261, 266,
        258, 281, 336, 246, 262, 275, 292, 282, 268, 270, 281, 286, 283, 272, 282, 337, 260, 274, 271, 258,
        264, 347, 281, 248, 262, 293, 254, 275, 288, 272, 265, 295, 289, 287, 272, 258, 270, 271, 274, 284,
        282, 282, 269, 290, 290, 279, 274, 266, 276, 268, 272, 272, 299, 306, 342, 291, 254, 262, 262, 263,
        287, 321, 275, 268, 255, 275, 279, 345, 273, 262, 267, 263, 335, 274, 288, 269, 272, 273, 324, 252,
        263, 272, 279, 281, 270, 276, 261, 278, 273, 270, 278, 275, 279, 285, 264, 287, 270, 284, 288, 262,
        272, 279, 293, 334, 329, 237, 261, 274, 300, 276, 278, 273, 277, 271, 274, 285, 278, 271, 286, 288,
        280, 276, 275, 280, 271, 284, 262, 279, 276, 283, 308, 322, 257, 274, 270, 263, 284, 260, 277, 353,
        324, 234, 247, 254, 284, 265, 275, 329, 265, 276, 265, 265, 273, 344, 272, 262, 286, 263, 274, 271,
        281, 278, 289, 260, 321, 261, 276, 277, 278, 288, 301, 316, 281, 254, 262, 323, 257, 264, 266, 260,
        259, 262, 315, 296, 288, 283, 330, 267, 264, 266, 268, 284, 252, 265, 260, 313, 332, 256, 281, 259,
        263, 266, 285, 270, 278, 276, 278, 291, 277, 264, 265, 267, 283, 282, 288, 278, 274, 285, 281, 271,
        278, 279, 268, 279, 266, 283, 312, 337, 300, 256, 268, 260, 259, 338, 284, 268, 264, 279, 270, 273,
        285, 287, 276, 272, 276, 277, 336, 274, 253, 259, 305, 308, 264, 268, 271, 269, 272, 276, 281, 270,
        292, 264, 277, 281, 273, 284, 272, 268, 269, 371, 341, 274, 253, 258, 270, 256, 249, 346, 254, 283,
        265, 278, 271, 269, 273, 284, 277, 270, 275, 300, 277, 280, 267, 286, 283, 271, 282, 277, 270, 318,
        273, 266, 268, 285, 331, 257, 269, 269, 269, 274, 264, 280, 278, 278, 282, 303, 269, 264, 279, 273,
        273, 269, 270, 318, 259, 277, 313, 267, 266, 273, 274, 272, 293, 270, 289, 296, 286, 341, 268, 253,
        272, 286, 276, 256, 269, 281, 291, 308, 289, 281, 280, 263, 282, 267, 288, 284, 280, 250, 293, 287,
        271, 267, 274, 306, 278, 276, 269, 272, 270, 311, 270, 267, 269, 266, 344, 263, 297, 274, 269, 271,
        277, 275, 276, 261, 272, 271, 284, 260, 274, 300, 371, 277, 240, 261, 274, 274, 274, 287, 279, 273,
        280, 283, 276, 278, 268, 275, 280, 289, 286, 289, 272, 289, 284, 271, 282, 294, 289, 280, 278, 285,
        273, 275, 300, 280, 259, 269, 276, 272, 300, 259, 283, 283, 280, 278, 286, 259, 268, 286, 272, 264,
        280, 274, 272, 284, 277, 270, 282, 291, 281, 272, 283, 286, 299, 277, 305, 264, 270, 277, 280, 271,
        279, 341, 319, 253, 246, 332, 299, 243, 253, 278, 265, 298, 273, 277, 268, 275, 331, 274, 264, 247,
        268, 270, 274, 282, 279, 295, 281, 267, 280, 274, 263, 276, 375, 250, 266, 254, 270, 325, 260, 265,
        277, 275, 288, 266, 273, 279, 272, 286, 270, 325, 255, 265, 282, 265, 307, 275, 269, 285, 281, 285,
        305, 276, 264, 274, 280, 277, 283, 264, 292, 262, 278, 305, 295, 271, 272, 247, 341, 264, 258, 263,
        302, 250, 290, 280, 260, 254, 282, 286, 281, 299, 324, 271, 263, 287, 283, 275, 281, 287, 269, 278};
    uint32_t LC_AAC_2_22050[] =
    {0, 372, 372, 373, 372, 372, 373, 372, 526, 359, 358, 308, 320, 364, 373, 372, 372, 373, 372, 372, 373,
        372, 372, 374, 424, 357, 388, 347, 357, 360, 372, 379, 366, 372, 373, 372, 372, 373, 372, 373, 494,
        431, 422, 414, 387, 380, 388, 387, 399, 403, 372, 363, 351, 371, 353, 352, 324, 329, 385, 325, 327,
        295, 335, 349, 373, 372, 372, 386, 359, 372, 373, 372, 372, 373, 372, 373, 372, 411, 504, 379, 444,
        395, 371, 470, 380, 386, 392, 391, 375, 375, 386, 361, 368, 368, 423, 366, 362, 366, 367, 365, 378,
        378, 379, 377, 370, 335, 351, 322, 387, 368, 440, 372, 371, 346, 359, 383, 364, 390, 366, 382, 348,
        367, 396, 371, 351, 302, 403, 406, 363, 348, 323, 446, 361, 367, 368, 315, 395, 452, 395, 370, 387,
        377, 351, 372, 370, 366, 392, 368, 433, 358, 369, 356, 380, 377, 364, 374, 388, 383, 344, 418, 354,
        359, 359, 391, 360, 356, 369, 376, 379, 345, 362, 366, 370, 379, 370, 371, 361, 334, 371, 339, 446,
        454, 364, 356, 360, 436, 423, 324, 328, 337, 333, 434, 399, 382, 345, 355, 402, 354, 355, 374, 353,
        357, 366, 354, 431, 361, 370, 381, 368, 373, 373, 407, 341, 357, 335, 359, 376, 384, 423, 408, 348,
        416, 352, 340, 359, 370, 370, 372, 371, 362, 371, 370, 449, 432, 345, 335, 389, 368, 332, 364, 360,
        423, 342, 352, 337, 429, 326, 431, 383, 369, 389, 354, 335, 352, 365, 349, 379, 376, 370, 380, 382,
        378, 360, 369, 384, 367, 363, 373, 362, 363, 368, 377, 400, 388, 434, 420, 353, 341, 355, 339, 368,
        362, 429, 469, 333, 355, 356, 363, 345, 369, 366, 356, 343, 356, 428, 357, 359, 342, 364, 373, 445,
        367, 343, 368, 435, 433, 338, 361, 347, 360, 359, 359, 361, 363, 356, 367, 374, 448, 371, 366, 362,
        370, 357, 371, 353, 389, 355, 439, 428, 415, 344, 340, 363, 361, 380, 359, 364, 366, 354, 370, 373,
        357, 352, 364, 373, 367, 339, 372, 374, 380, 323, 381, 362, 451, 378, 367, 367, 370, 429, 447, 357,
        328, 350, 425, 411, 346, 345, 328, 350, 383, 432, 380, 358, 364, 425, 361, 354, 372, 373, 367, 361,
        375, 357, 351, 405, 420, 358, 370, 379, 384, 355, 362, 366, 431, 360, 333, 432, 381, 378, 351, 350,
        347, 341, 342, 357, 360, 359, 353, 369, 388, 377, 373, 441, 364, 427, 351, 353, 426, 383, 365, 363,
        368, 370, 333, 351, 360, 368, 363, 364, 361, 371, 366, 369, 369, 361, 392, 360, 367, 362, 367, 429,
        360, 435, 344, 350, 328, 355, 441, 436, 350, 341, 352, 400, 371, 348, 353, 426, 351, 363, 364, 433,
        357, 361, 371, 343, 374, 422, 422, 354, 361, 354, 374, 362, 370, 363, 368, 418, 360, 361, 364, 433,
        334, 370, 356, 356, 357, 374, 358, 371, 361, 448, 364, 364, 348, 362, 425, 343, 346, 438, 368, 349,
        356, 354, 352, 351, 373, 372, 375, 364, 375, 364, 421, 360, 366, 365, 353, 356, 403, 370, 435, 431,
        414, 337, 336, 421, 337, 342, 358, 356, 362, 372, 365, 364, 422, 357, 345, 358, 358, 370, 365, 445,
        438, 429, 339, 407, 345, 347, 336, 348, 374, 372, 354, 349, 388, 426, 431, 429, 330, 344, 351, 376,
        414, 411, 407, 389, 354, 346, 326, 420, 405, 333, 329, 354, 348, 351, 344, 338, 345, 348, 441, 353,
        369, 428, 417, 351, 354, 343, 372, 400, 351, 344, 347, 355, 463, 352, 383, 446, 334, 343, 359, 347,
        354, 361, 378, 391, 426, 423, 352, 389, 350, 349, 510, 315, 403, 347, 359, 359, 369, 361, 355, 358,
        386, 351, 364, 380, 365, 368, 362, 369, 370, 378, 388, 376, 364, 396, 367, 360, 398, 371, 360, 384,
        381, 360, 357, 354, 370, 451, 356, 364, 353, 412, 340, 344, 363, 349, 352, 375, 367, 366, 367, 363,
        370, 391, 397, 369, 366, 399, 436, 395, 351, 349, 350, 356, 352, 356, 342, 367, 374, 326, 381, 383,
        449, 336, 358, 332, 440, 504, 465, 375, 322, 336, 409, 402, 374, 348, 327, 342, 336, 346, 329, 366,
        383, 337, 371, 375, 362, 345, 378, 368, 374, 412, 356, 361, 516, 356, 406, 352, 344, 427, 373, 363,
        352, 349, 364, 347, 355, 379, 384, 360, 401, 334, 357, 372, 368, 420, 343, 382, 397, 355, 369, 354,
        426, 354, 370, 365, 378, 347, 357, 438, 350, 357, 343, 441, 357, 368, 421, 409, 333, 340, 418, 413,
        406, 376, 324, 367, 351, 393, 334, 353, 363, 430, 335, 344, 364, 444, 353, 364, 376, 334, 363, 373};
    uint32_t HE_AAC_1_24000[] =
    {0, 279, 279, 328, 324, 352, 305, 267, 268, 274, 294, 277, 272, 283, 324, 259, 258, 261, 271, 268, 297,
        275, 312, 343, 251, 257, 258, 247, 264, 302, 261, 283, 267, 277, 282, 273, 267, 328, 291, 267, 276,
        267, 277, 319, 264, 269, 335, 244, 264, 268, 272, 257, 339, 255, 260, 261, 275, 276, 277, 271, 287,
        343, 268, 269, 283, 279, 275, 267, 283, 282, 285, 277, 338, 265, 260, 311, 307, 246, 279, 248, 260,
        288, 263, 265, 334, 258, 265, 335, 249, 277, 271, 268, 281, 308, 265, 266, 308, 265, 276, 329, 316,
        304, 264, 246, 313, 306, 257, 250, 241, 273, 265, 268, 330, 265, 273, 261, 272, 272, 313, 272, 275,
        265, 244, 277, 285, 271, 292, 289, 283, 334, 269, 264, 266, 280, 272, 320, 262, 269, 296, 266, 291,
        266, 277, 269, 273, 280, 284, 271, 279, 269, 287, 325, 268, 270, 252, 348, 264, 259, 329, 252, 264,
        302, 270, 272, 327, 268, 263, 270, 270, 266, 282, 261, 273, 262, 283, 257, 270, 275, 353, 292, 293,
        282, 259, 260, 280, 280, 265, 275, 280, 277, 278, 265, 309, 327, 268, 272, 270, 292, 274, 272, 266,
        264, 270, 277, 284, 308, 268, 275, 280, 270, 308, 265, 266, 260, 281, 296, 337, 322, 289, 242, 260,
        267, 302, 323, 256, 296, 247, 246, 324, 265, 255, 278, 278, 272, 291, 256, 275, 276, 277, 273, 271,
        273, 270, 275, 284, 330, 285, 266, 331, 255, 279, 263, 280, 262, 265, 269, 276, 296, 324, 262, 276,
        281, 269, 282, 268, 278, 260, 265, 312, 302, 268, 276, 328, 260, 273, 266, 280, 278, 268, 266, 273,
        280, 279, 272, 278, 264, 268, 344, 266, 276, 272, 270, 271, 279, 276, 281, 279, 276, 259, 320, 273,
        263, 285, 271, 283, 300, 268, 276, 277, 278, 271, 270, 276, 280, 296, 285, 282, 274, 270, 275, 294,
        265, 311, 258, 285, 308, 274, 284, 295, 267, 267, 261, 266, 293, 339, 257, 251, 270, 270, 278, 281,
        275, 283, 267, 285, 279, 280, 286, 275, 294, 289, 338, 269, 284, 316, 299, 284, 304, 267, 265, 249,
        245, 263, 257, 269, 264, 272, 285, 318, 272, 260, 294, 272, 304, 360, 279, 269, 301, 260, 246, 277,
        260, 256, 261, 266, 260, 284, 290, 272, 330, 255, 274, 286, 338, 252, 278, 262, 276, 290, 266, 272,
        269, 277, 278, 304, 302, 263, 269, 270, 262, 284, 296, 283, 336, 252, 255, 270, 266, 280, 264, 277,
        270, 316, 269, 268, 270, 287, 278, 341, 252, 271, 271, 278, 266, 274, 273, 282, 277, 284, 272, 286,
        282, 280, 278, 279, 328, 275, 270, 304, 286, 271, 307, 264, 274, 278, 270, 281, 298, 267, 289, 316,
        266, 276, 284, 263, 275, 269, 246, 341, 272, 257, 280, 275, 272, 289, 288, 260, 261, 266, 274, 278,
        268, 279, 283, 272, 270, 352, 307, 257, 266, 262, 280, 257, 269, 278, 291, 264, 334, 262, 280, 263,
        267, 277, 263, 270, 284, 320, 311, 279, 248, 248, 260, 281, 284, 282, 313, 337, 258, 288, 305, 270,
        291, 269, 264, 267, 260, 272, 308, 271, 266, 260, 275, 277, 279, 279, 272, 267, 271, 280, 317, 274,
        278, 292, 265, 290, 320, 259, 276, 267, 272, 339, 245, 262, 335, 251, 267, 271, 260, 285, 299, 281,
        257, 334, 251, 265, 312, 254, 253, 276, 283, 285, 264, 290, 277, 276, 283, 269, 288, 266, 276, 289,
        281, 263, 286, 326, 266, 282, 263, 265, 268, 269, 350, 264, 288, 250, 269, 279, 299, 274, 294, 313,
        240, 250, 274, 280, 283, 330, 274, 273, 322, 261, 258, 259, 258, 295, 324, 271, 309, 279, 257, 259,
        261, 266, 298, 307, 267, 276, 325, 239, 262, 309, 297, 269, 294, 250, 263, 257, 265, 303, 327, 259,
        270, 289, 266, 306, 256, 266, 302, 320, 250, 261, 277, 306, 275, 267, 265, 360, 252, 237, 280, 255,
        303, 317, 250, 270, 257, 258, 282, 268, 284, 276, 325, 261, 318, 258, 263, 285, 279, 270, 329, 260,
        260, 309, 254, 283, 302, 253, 282, 302, 288, 276, 268, 266, 327, 265, 262, 322, 333, 232, 245, 250,
        299, 293, 328, 249, 260, 301, 243, 277, 272, 261, 265, 260, 268, 315, 283, 259, 269, 266, 271, 270,
        277, 280, 284, 278, 274, 300, 267, 270, 279, 279, 290, 299, 282, 283, 268, 272, 273, 297, 290, 279,
        286, 274, 278, 284, 274, 282, 287, 274, 308, 269, 267, 268, 269, 274, 299, 267, 273, 278, 273, 273,
        326, 292, 261, 265, 270, 269, 295, 268, 284, 276, 269, 284, 287, 279, 275, 284, 252, 286, 316, 268};
    uint32_t HE_AAC_2_24000[] =
    {0, 372, 372, 373, 372, 462, 461, 379, 362, 352, 363, 389, 375, 393, 473, 388, 399, 395, 377, 393, 367,
        383, 404, 437, 384, 389, 381, 376, 338, 365, 349, 367, 380, 376, 382, 380, 364, 381, 369, 369, 376,
        372, 374, 379, 373, 374, 399, 357, 374, 373, 359, 369, 412, 340, 372, 386, 365, 372, 349, 352, 360,
        428, 360, 380, 388, 382, 372, 357, 349, 362, 369, 354, 408, 382, 376, 409, 391, 337, 352, 354, 357,
        374, 353, 384, 422, 381, 387, 399, 347, 365, 350, 362, 368, 390, 363, 350, 378, 354, 365, 416, 402,
        382, 361, 344, 413, 395, 358, 341, 342, 347, 352, 341, 405, 361, 358, 350, 345, 358, 405, 362, 363,
        355, 345, 368, 372, 364, 367, 373, 369, 400, 379, 362, 353, 363, 368, 428, 368, 381, 387, 359, 389,
        357, 358, 365, 360, 365, 370, 364, 376, 366, 362, 402, 361, 358, 366, 503, 346, 354, 407, 357, 350,
        391, 350, 367, 426, 364, 357, 358, 370, 354, 358, 360, 360, 380, 389, 364, 374, 369, 431, 391, 391,
        390, 354, 359, 366, 361, 353, 356, 363, 363, 370, 368, 389, 429, 361, 368, 360, 402, 393, 390, 357,
        355, 376, 381, 361, 381, 369, 374, 375, 359, 387, 380, 369, 350, 360, 372, 419, 431, 395, 373, 346,
        346, 364, 414, 360, 394, 329, 350, 422, 371, 371, 385, 366, 352, 376, 349, 346, 357, 360, 354, 349,
        357, 367, 362, 357, 394, 364, 357, 483, 369, 352, 353, 364, 360, 358, 355, 365, 381, 412, 361, 355,
        373, 364, 391, 384, 376, 371, 383, 380, 379, 365, 386, 421, 352, 351, 357, 356, 355, 364, 357, 360,
        364, 366, 363, 365, 356, 354, 442, 362, 361, 367, 374, 356, 360, 363, 373, 382, 377, 356, 432, 383,
        365, 377, 372, 355, 412, 372, 352, 378, 368, 367, 366, 371, 360, 362, 358, 374, 364, 369, 360, 391,
        389, 408, 387, 360, 391, 367, 362, 439, 361, 354, 362, 370, 372, 488, 354, 365, 371, 369, 364, 382,
        367, 362, 369, 368, 372, 378, 380, 374, 371, 380, 415, 363, 362, 412, 398, 383, 390, 362, 366, 345,
        346, 356, 354, 359, 346, 358, 359, 405, 369, 368, 360, 362, 392, 511, 405, 380, 401, 355, 338, 365,
        341, 358, 347, 351, 346, 351, 343, 350, 433, 354, 353, 364, 437, 355, 373, 371, 355, 415, 350, 350,
        349, 366, 367, 392, 389, 360, 355, 355, 356, 364, 362, 366, 441, 360, 366, 374, 371, 400, 364, 357,
        351, 390, 371, 360, 357, 363, 353, 443, 367, 370, 385, 370, 381, 373, 372, 377, 382, 377, 374, 374,
        372, 368, 377, 377, 400, 366, 366, 378, 372, 362, 385, 357, 364, 360, 358, 374, 378, 360, 380, 414,
        369, 375, 395, 352, 373, 367, 342, 403, 373, 364, 375, 354, 353, 375, 388, 347, 349, 353, 356, 362,
        354, 356, 380, 354, 362, 450, 396, 360, 367, 361, 369, 348, 355, 367, 369, 367, 487, 356, 359, 379,
        359, 380, 380, 383, 373, 400, 426, 391, 372, 362, 368, 380, 389, 352, 382, 421, 343, 356, 387, 350,
        382, 370, 359, 352, 353, 357, 378, 360, 353, 353, 366, 373, 381, 374, 373, 365, 369, 369, 399, 373,
        370, 370, 356, 391, 434, 366, 363, 354, 367, 443, 338, 356, 435, 339, 361, 359, 353, 355, 369, 350,
        364, 427, 362, 364, 396, 347, 345, 373, 361, 372, 363, 389, 363, 375, 360, 365, 381, 361, 363, 379,
        378, 359, 367, 445, 355, 369, 366, 351, 350, 360, 435, 359, 387, 371, 376, 376, 370, 354, 360, 419,
        353, 361, 361, 370, 367, 398, 371, 362, 432, 368, 365, 366, 364, 372, 411, 365, 390, 355, 355, 361,
        365, 365, 359, 386, 368, 361, 461, 352, 356, 365, 389, 372, 392, 359, 359, 374, 351, 373, 422, 360,
        363, 352, 362, 383, 355, 362, 367, 482, 349, 361, 368, 356, 365, 349, 356, 511, 358, 357, 375, 349,
        362, 411, 346, 370, 375, 375, 377, 376, 369, 362, 411, 362, 399, 352, 366, 373, 372, 373, 406, 359,
        365, 408, 354, 369, 403, 348, 349, 361, 356, 365, 362, 350, 422, 381, 358, 383, 473, 347, 349, 358,
        370, 367, 408, 348, 345, 406, 353, 377, 350, 338, 342, 341, 346, 386, 365, 353, 359, 369, 363, 366,
        373, 374, 367, 364, 370, 391, 373, 373, 378, 375, 377, 391, 362, 361, 361, 368, 372, 378, 374, 367,
        384, 365, 371, 364, 366, 375, 370, 379, 409, 380, 378, 370, 370, 373, 394, 362, 355, 364, 361, 367,
        413, 376, 360, 370, 367, 358, 384, 365, 361, 383, 366, 368, 386, 381, 372, 369, 368, 378, 416, 362};
    uint32_t HE_AAC_1_32000[] =
    {0, 279, 279, 340, 324, 311, 349, 297, 244, 271, 275, 272, 274, 289, 278, 298, 274, 302, 318, 251, 253,
        262, 266, 276, 270, 280, 284, 286, 285, 324, 307, 242, 257, 274, 290, 262, 269, 289, 297, 261, 283,
        274, 277, 281, 280, 276, 276, 275, 297, 331, 266, 262, 264, 268, 269, 287, 280, 336, 261, 278, 276,
        301, 254, 261, 257, 268, 282, 282, 308, 326, 256, 265, 261, 271, 277, 285, 276, 282, 279, 282, 317,
        286, 268, 266, 272, 275, 287, 264, 271, 286, 290, 270, 301, 285, 282, 278, 329, 266, 263, 252, 327,
        254, 246, 257, 292, 260, 267, 282, 291, 272, 278, 305, 296, 269, 278, 308, 300, 264, 265, 263, 263,
        272, 278, 311, 279, 271, 273, 306, 262, 267, 280, 325, 333, 305, 281, 280, 245, 244, 308, 305, 256,
        241, 266, 259, 278, 274, 274, 274, 294, 302, 271, 271, 278, 261, 269, 297, 317, 270, 271, 273, 268,
        270, 256, 320, 269, 278, 281, 283, 275, 279, 277, 289, 307, 283, 266, 261, 311, 269, 252, 326, 277,
        271, 275, 292, 279, 273, 294, 253, 253, 272, 269, 271, 280, 275, 290, 277, 268, 278, 280, 284, 330,
        300, 273, 265, 262, 322, 298, 250, 265, 266, 315, 272, 265, 268, 284, 269, 275, 289, 288, 268, 279,
        281, 280, 277, 269, 277, 272, 279, 280, 261, 288, 294, 285, 264, 276, 265, 314, 273, 274, 297, 270,
        277, 271, 279, 267, 286, 289, 283, 288, 263, 284, 283, 270, 287, 283, 276, 332, 261, 271, 278, 279,
        274, 316, 258, 270, 255, 270, 271, 351, 259, 263, 271, 316, 270, 263, 285, 274, 281, 273, 278, 281,
        268, 275, 273, 299, 306, 291, 283, 306, 259, 257, 274, 277, 268, 275, 290, 315, 270, 276, 266, 274,
        254, 278, 326, 287, 265, 271, 266, 281, 287, 268, 298, 269, 254, 268, 270, 283, 282, 278, 277, 272,
        273, 283, 285, 274, 295, 296, 276, 265, 273, 282, 333, 281, 267, 265, 273, 279, 273, 273, 279, 304,
        269, 300, 315, 266, 268, 266, 272, 270, 271, 294, 279, 273, 273, 273, 261, 297, 336, 283, 283, 267,
        264, 315, 267, 262, 256, 278, 274, 278, 272, 266, 272, 273, 275, 277, 278, 288, 284, 297, 267, 269,
        329, 316, 261, 264, 268, 266, 275, 278, 283, 268, 265, 271, 296, 282, 284, 274, 258, 338, 271, 270,
        268, 275, 270, 288, 303, 290, 271, 260, 281, 268, 279, 291, 311, 253, 283, 270, 292, 289, 280, 273,
        287, 257, 272, 273, 315, 256, 269, 279, 330, 261, 272, 257, 286, 314, 267, 294, 308, 262, 261, 254,
        273, 273, 280, 322, 286, 261, 267, 276, 281, 277, 273, 284, 285, 275, 275, 281, 271, 281, 278, 283,
        289, 302, 281, 295, 275, 273, 323, 296, 263, 284, 286, 284, 280, 277, 287, 274, 268, 265, 263, 255,
        274, 265, 268, 275, 271, 271, 289, 275, 274, 312, 292, 268, 278, 280, 275, 334, 274, 291, 336, 254,
        279, 286, 279, 247, 258, 309, 269, 249, 266, 260, 262, 262, 275, 267, 272, 277, 279, 307, 264, 267,
        295, 304, 318, 262, 272, 272, 270, 286, 273, 318, 262, 263, 264, 290, 266, 283, 303, 309, 275, 269,
        271, 294, 264, 277, 269, 286, 275, 266, 278, 326, 261, 269, 291, 260, 285, 265, 272, 276, 281, 298,
        269, 281, 281, 269, 270, 274, 308, 271, 293, 333, 248, 283, 263, 266, 278, 276, 292, 275, 270, 269,
        282, 279, 277, 292, 291, 269, 288, 274, 282, 271, 282, 293, 323, 250, 287, 276, 314, 283, 258, 281,
        283, 276, 289, 297, 306, 287, 254, 286, 268, 271, 271, 271, 282, 275, 259, 308, 273, 266, 265, 269,
        263, 261, 330, 293, 260, 274, 274, 266, 270, 286, 285, 278, 272, 266, 281, 274, 269, 276, 277, 276,
        279, 296, 290, 263, 279, 271, 337, 300, 282, 262, 271, 272, 262, 267, 269, 275, 279, 279, 280, 272,
        283, 383, 254, 256, 275, 275, 270, 275, 269, 283, 281, 281, 310, 300, 301, 304, 259, 257, 260, 258,
        269, 276, 268, 275, 293, 299, 323, 297, 261, 278, 296, 281, 263, 310, 286, 255, 281, 265, 268, 265,
        274, 287, 264, 273, 261, 282, 283, 276, 287, 275, 273, 285, 278, 270, 270, 281, 283, 304, 267, 265,
        280, 303, 289, 267, 304, 312, 263, 269, 268, 258, 257, 300, 279, 257, 269, 297, 329, 258, 261, 270,
        267, 276, 295, 308, 286, 265, 269, 321, 312, 247, 259, 313, 310, 254, 259, 270, 278, 271, 267, 273,
        289, 286, 266, 268, 271, 278, 280, 296, 271, 265, 273, 283, 280, 275, 281, 281, 279, 331, 251, 277};
    uint32_t HE_AAC_2_32000[] =
    {0, 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1023, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1023, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1023, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1023, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1023, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1023, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1023, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1023, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1023, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1023,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1023,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1023, 1024, 1048, 1001, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1023, 1024, 1024, 1024, 1024, 1024, 1071, 977, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024};
    uint32_t HE_AAC_1_44100[] =
    {0, 279, 279, 356, 328, 314, 313, 292, 375, 243, 248, 252, 268, 270, 283, 276, 286, 288, 274, 274, 283,
        271, 273, 296, 325, 257, 254, 277, 276, 275, 265, 287, 276, 279, 269, 285, 286, 276, 287, 296, 320,
        261, 268, 261, 275, 271, 279, 278, 286, 280, 264, 299, 266, 286, 271, 270, 280, 273, 288, 293, 278,
        287, 280, 284, 269, 271, 290, 326, 251, 268, 276, 277, 284, 272, 265, 288, 284, 286, 312, 273, 281,
        268, 263, 321, 253, 270, 281, 280, 268, 274, 269, 278, 282, 296, 333, 250, 267, 261, 283, 266, 280,
        282, 280, 275, 271, 275, 278, 279, 280, 293, 336, 259, 270, 269, 275, 271, 270, 279, 284, 283, 290,
        286, 272, 280, 286, 277, 294, 288, 292, 249, 285, 313, 288, 259, 264, 269, 263, 317, 267, 272, 266,
        273, 280, 265, 282, 270, 284, 269, 298, 263, 273, 282, 278, 338, 266, 267, 263, 284, 311, 274, 273,
        275, 257, 281, 274, 259, 275, 274, 280, 306, 293, 285, 282, 280, 297, 315, 277, 256, 282, 289, 308,
        313, 305, 277, 275, 257, 259, 251, 266, 274, 316, 291, 247, 254, 267, 279, 267, 272, 273, 279, 277,
        272, 266, 291, 340, 277, 267, 273, 276, 275, 273, 275, 278, 276, 294, 286, 273, 275, 280, 272, 269,
        268, 275, 343, 256, 279, 280, 285, 281, 267, 277, 276, 277, 273, 283, 280, 318, 276, 272, 268, 266,
        264, 323, 276, 256, 273, 298, 258, 273, 272, 291, 272, 300, 279, 273, 282, 278, 269, 272, 280, 271,
        287, 273, 274, 287, 277, 276, 261, 276, 273, 279, 291, 272, 287, 304, 329, 307, 261, 283, 247, 257,
        297, 316, 291, 255, 267, 269, 278, 318, 276, 265, 274, 267, 319, 269, 285, 260, 275, 257, 320, 256,
        273, 271, 271, 282, 275, 275, 273, 271, 284, 268, 274, 268, 278, 276, 273, 297, 284, 285, 287, 272,
        275, 283, 280, 309, 325, 256, 269, 274, 294, 277, 283, 275, 275, 277, 273, 273, 270, 275, 273, 278,
        290, 278, 284, 279, 274, 281, 265, 291, 274, 280, 303, 322, 266, 271, 283, 270, 271, 263, 284, 322,
        326, 249, 255, 263, 279, 275, 284, 315, 262, 254, 271, 271, 274, 321, 279, 265, 273, 276, 272, 277,
        282, 280, 280, 270, 304, 272, 271, 280, 283, 290, 266, 335, 289, 256, 282, 310, 262, 258, 259, 274,
        271, 261, 298, 293, 273, 291, 314, 276, 273, 271, 268, 297, 259, 253, 264, 301, 330, 262, 278, 268,
        262, 269, 283, 277, 272, 284, 285, 284, 273, 260, 271, 278, 276, 272, 275, 282, 281, 285, 271, 275,
        282, 282, 277, 275, 280, 278, 296, 312, 291, 277, 257, 268, 269, 307, 320, 271, 260, 274, 281, 267,
        274, 289, 282, 277, 265, 261, 315, 282, 281, 274, 315, 298, 267, 266, 270, 258, 270, 278, 273, 266,
        286, 264, 283, 287, 273, 284, 271, 267, 280, 333, 329, 295, 282, 276, 264, 261, 256, 320, 255, 271,
        267, 264, 267, 267, 272, 284, 271, 277, 282, 294, 286, 269, 278, 276, 269, 284, 289, 283, 271, 313,
        281, 271, 267, 290, 335, 260, 269, 263, 271, 286, 265, 277, 282, 283, 270, 293, 266, 268, 269, 282,
        286, 277, 272, 288, 274, 281, 322, 278, 274, 274, 266, 270, 291, 266, 280, 292, 289, 331, 269, 267,
        272, 277, 266, 264, 274, 278, 286, 294, 269, 271, 301, 291, 282, 270, 282, 275, 270, 260, 278, 274,
        271, 272, 274, 283, 281, 298, 283, 284, 272, 299, 284, 271, 277, 281, 319, 259, 281, 279, 275, 270,
        274, 268, 280, 267, 266, 273, 288, 271, 274, 290, 348, 275, 269, 269, 278, 266, 284, 281, 289, 268,
        280, 281, 275, 288, 269, 288, 283, 287, 271, 272, 274, 303, 276, 274, 280, 290, 289, 268, 285, 276,
        285, 268, 317, 287, 252, 272, 277, 274, 287, 266, 276, 280, 278, 288, 271, 277, 270, 259, 268, 279,
        278, 274, 276, 266, 281, 282, 280, 286, 275, 282, 279, 289, 283, 289, 302, 274, 291, 271, 271, 270,
        278, 322, 318, 252, 273, 342, 298, 239, 263, 275, 279, 290, 270, 265, 258, 298, 322, 264, 257, 260,
        276, 266, 271, 280, 265, 287, 277, 289, 262, 278, 280, 279, 358, 253, 264, 263, 276, 328, 271, 266,
        276, 264, 287, 260, 269, 271, 279, 280, 265, 329, 272, 279, 273, 273, 300, 262, 280, 288, 292, 299,
        288, 285, 262, 262, 277, 277, 275, 266, 275, 269, 269, 297, 283, 272, 270, 263, 339, 264, 271, 279,
        306, 264, 289, 274, 271, 269, 297, 279, 280, 279, 296, 272, 264, 296, 273, 267, 276, 278, 278, 294};
    uint32_t HE_AAC_2_44100[] =
    {0, 742, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 780, 707, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 742, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 846, 690, 742, 710, 727,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 802, 731, 696, 743, 743, 743,
        743, 743, 743, 743, 743, 760, 726, 743, 743, 743, 743, 743, 743, 895, 685,
        690, 725, 720, 743, 743, 743, 743, 743, 743, 743, 743, 839, 688, 702, 743,
        743, 743, 910, 709, 719, 717, 796, 691, 680, 722, 743, 743, 743, 743, 742,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 833, 751, 728, 706, 697, 743, 743, 825, 786, 660,
        701, 743, 743, 743, 743, 743, 743, 743, 850, 733, 752, 726, 710, 703, 886,
        696, 677, 697, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 824, 666, 739, 743, 754,
        732, 762, 724, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 787, 724, 718, 743, 743, 743, 743, 743,
        800, 994, 626, 666, 684, 688, 743, 743, 852, 695, 682, 743, 743, 743, 830,
        710, 689, 743, 743, 743, 743, 742, 743, 743, 743, 745, 741, 743, 743, 743,
        743, 743, 862, 790, 645, 719, 895, 695, 739, 692, 650, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 967, 646, 690,
        669, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
        743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, 791, 752};
    uint32_t HE_AAC_1_48000[] =
    {0, 279, 279, 354, 333, 317, 301, 298, 346, 284, 270, 240, 268, 285, 269, 267, 270, 269, 282, 275, 279,
        279, 268, 282, 283, 340, 316, 251, 261, 264, 261, 268, 270, 288, 279, 276, 275, 271, 273, 298, 275,
        281, 283, 317, 268, 269, 267, 264, 298, 280, 269, 277, 278, 279, 285, 282, 270, 290, 282, 271, 290,
        284, 272, 272, 268, 278, 284, 283, 275, 279, 280, 284, 317, 320, 257, 261, 255, 281, 270, 275, 284,
        277, 277, 277, 304, 294, 276, 266, 273, 267, 321, 268, 256, 272, 276, 270, 278, 270, 277, 286, 278,
        282, 339, 257, 262, 279, 271, 268, 268, 271, 275, 277, 285, 280, 277, 288, 271, 285, 303, 305, 322,
        260, 261, 269, 278, 273, 259, 272, 284, 278, 291, 270, 284, 281, 281, 285, 276, 322, 293, 293, 248,
        297, 285, 313, 250, 259, 253, 282, 270, 322, 249, 275, 262, 279, 277, 288, 268, 268, 271, 272, 290,
        290, 279, 265, 274, 274, 313, 262, 275, 278, 279, 268, 318, 273, 274, 291, 272, 278, 257, 268, 272,
        279, 285, 272, 306, 283, 302, 276, 266, 291, 308, 286, 263, 268, 283, 326, 315, 309, 285, 280, 269,
        274, 266, 254, 265, 285, 283, 309, 254, 256, 257, 261, 267, 271, 282, 275, 275, 288, 276, 269, 272,
        295, 309, 273, 270, 277, 280, 275, 273, 282, 271, 270, 281, 333, 279, 269, 270, 290, 263, 270, 275,
        279, 303, 331, 244, 269, 281, 276, 269, 273, 281, 278, 275, 273, 279, 273, 326, 276, 279, 276, 259,
        273, 268, 333, 292, 260, 257, 266, 288, 266, 283, 281, 287, 268, 288, 279, 273, 283, 280, 275, 270,
        269, 278, 280, 281, 278, 283, 286, 272, 270, 274, 273, 263, 279, 277, 285, 272, 277, 308, 341, 297,
        278, 256, 274, 250, 266, 318, 356, 253, 255, 265, 278, 265, 295, 297, 273, 258, 274, 285, 323, 265,
        268, 264, 265, 263, 302, 277, 277, 274, 268, 270, 277, 275, 277, 274, 277, 275, 281, 279, 283, 274,
        274, 283, 286, 280, 282, 278, 282, 280, 279, 278, 292, 283, 326, 291, 320, 249, 258, 284, 272, 278,
        263, 270, 271, 272, 278, 278, 281, 277, 280, 275, 279, 280, 280, 283, 286, 283, 275, 284, 287, 275,
        271, 306, 313, 271, 270, 285, 264, 277, 261, 260, 285, 333, 304, 274, 281, 258, 265, 266, 284, 312,
        288, 258, 263, 280, 270, 264, 334, 266, 269, 280, 283, 270, 268, 273, 276, 295, 272, 270, 299, 280,
        279, 277, 271, 274, 309, 286, 310, 270, 264, 272, 299, 255, 265, 263, 275, 285, 268, 270, 297, 282,
        289, 294, 320, 264, 273, 275, 269, 284, 267, 258, 272, 272, 325, 292, 278, 259, 285, 272, 270, 274,
        295, 290, 274, 272, 281, 267, 286, 252, 264, 272, 273, 276, 273, 280, 281, 281, 280, 271, 274, 280,
        291, 278, 273, 275, 281, 277, 325, 298, 269, 267, 266, 279, 265, 308, 331, 265, 265, 266, 279, 276,
        270, 283, 282, 272, 273, 267, 273, 317, 278, 274, 269, 295, 301, 273, 280, 271, 268, 274, 273, 283,
        271, 272, 270, 300, 270, 283, 279, 275, 285, 269, 270, 271, 331, 321, 303, 287, 269, 260, 260, 258,
        267, 322, 275, 265, 263, 267, 277, 268, 274, 274, 277, 284, 277, 275, 289, 271, 276, 279, 284, 283,
        289, 274, 281, 277, 280, 320, 280, 271, 283, 279, 320, 293, 259, 266, 263, 269, 273, 267, 276, 276,
        283, 271, 293, 276, 268, 272, 275, 291, 291, 290, 273, 294, 260, 274, 356, 263, 274, 269, 268, 253,
        314, 264, 268, 281, 273, 271, 328, 276, 274, 261, 271, 287, 327, 261, 261, 274, 289, 294, 297, 270,
        277, 270, 270, 274, 276, 286, 280, 269, 261, 277, 267, 272, 271, 266, 270, 332, 272, 271, 280, 277,
        278, 306, 275, 277, 284, 278, 289, 284, 300, 284, 269, 275, 279, 297, 262, 271, 277, 265, 279, 290,
        270, 272, 275, 281, 391, 279, 242, 261, 272, 273, 267, 273, 284, 273, 268, 281, 280, 276, 282, 277,
        280, 279, 286, 276, 279, 295, 282, 284, 282, 271, 282, 288, 279, 273, 287, 275, 278, 274, 290, 292,
        276, 265, 256, 276, 268, 287, 286, 280, 275, 282, 280, 278, 273, 270, 266, 279, 277, 270, 275, 273,
        286, 267, 282, 273, 279, 276, 277, 283, 288, 287, 280, 290, 286, 289, 303, 276, 274, 278, 278, 272,
        277, 314, 318, 251, 257, 264, 325, 263, 265, 264, 281, 270, 305, 275, 275, 256, 268, 340, 264, 269,
        279, 270, 272, 279, 279, 276, 276, 279, 279, 281, 284, 268, 281, 265, 287, 355, 254, 260, 255, 267};
    uint32_t HE_AAC_2_48000[] =
    {0, 682, 683, 682, 683, 683, 682, 683, 682, 683, 683, 682, 683, 683, 682,
        683, 682, 683, 683, 682, 683, 683, 682, 683, 682, 683, 683, 682, 683, 683,
        682, 683, 682, 683, 683, 682, 683, 683, 682, 683, 682, 683, 683, 682, 683,
        683, 682, 683, 682, 683, 683, 682, 683, 683, 682, 683, 682, 683, 683, 682,
        683, 683, 682, 683, 682, 683, 683, 682, 683, 683, 682, 683, 682, 683, 683,
        682, 683, 683, 682, 683, 682, 683, 683, 682, 683, 683, 682, 683, 682, 683,
        683, 682, 683, 683, 682, 683, 682, 683, 683, 682, 683, 683, 682, 683, 682,
        683, 683, 682, 683, 683, 682, 683, 682, 683, 683, 682, 683, 683, 682, 683,
        682, 683, 683, 682, 683, 683, 682, 683, 682, 683, 683, 682, 683, 682, 683,
        683, 682, 683, 683, 682, 683, 682, 683, 683, 682, 683, 683, 682, 683, 682,
        683, 683, 682, 683, 683, 682, 683, 682, 683, 683, 682, 683, 683, 682, 683,
        682, 683, 683, 682, 683, 683, 682, 683, 682, 683, 683, 682, 683, 683, 682,
        683, 682, 683, 683, 682, 683, 683, 682, 683, 682, 683, 683, 682, 683, 683,
        682, 683, 682, 683, 683, 682, 683, 683, 682, 683, 682, 683, 683, 682, 683,
        683, 682, 683, 682, 683, 683, 682, 683, 683, 682, 683, 682, 683, 684, 682,
        683, 683, 682, 683, 682, 683, 683, 682, 685, 681, 682, 683, 682, 683, 683,
        682, 683, 709, 700, 686, 664, 700, 643, 676, 683, 683, 682, 683, 682, 683,
        683, 754, 690, 652, 672, 662, 665, 683, 837, 687, 637, 651, 654, 667, 666,
        662, 683, 682, 685, 738, 698, 679, 695, 690, 661, 661, 665, 665, 700, 673,
        681, 700, 701, 693, 689, 695, 682, 665, 667, 662, 656, 682, 683, 692, 785,
        757, 652, 648, 675, 648, 662, 760, 785, 612, 634, 623, 624, 682, 683, 737,
        661, 672, 660, 683, 735, 671, 692, 673, 685, 672, 732, 667, 658, 646, 678,
        682, 689, 696, 680, 666, 683, 684, 693, 686, 667, 683, 682, 683, 683, 682,
        683, 682, 683, 683, 682, 683, 683, 682, 759, 729, 664, 670, 676, 735, 662,
        738, 632, 665, 635, 635, 674, 683, 683, 682, 683, 682, 685, 681, 682, 683,
        683, 682, 683, 682, 683, 683, 682, 690, 785, 658, 680, 709, 688, 681, 676,
        640, 619, 833, 721, 637, 660, 674, 648, 606, 682, 745, 730, 665, 636, 638,
        682, 683, 798, 686, 682, 659, 657, 639, 659, 681, 682, 683, 683, 682, 745,
        636, 667, 683, 682, 683, 733, 709, 939, 604, 625, 660, 730, 622, 657, 652,
        643, 618, 682, 683, 682, 683, 683, 682, 759, 661, 640, 671, 682, 713, 674,
        664, 680, 683, 748, 771, 633, 642, 619, 682, 683, 683, 695, 672, 680, 683,
        683, 692, 693, 663, 682, 683, 688, 682, 700, 688, 685, 696, 702, 676, 686,
        670, 651, 667, 683, 683, 682, 683, 776, 739, 653, 657, 675, 671, 670, 807,
        673, 636, 675, 657, 678, 686, 669, 693, 682, 681, 658, 631, 679, 769, 705,
        676, 668, 706, 742, 621, 659, 654, 641, 685, 664, 692, 664, 682, 683, 703,
        670, 675, 682, 683, 683, 682, 683, 682, 710, 761, 725, 704, 685, 671, 645,
        659, 653, 785, 643, 663, 674, 667, 684, 664, 681, 696, 670, 686, 675, 679,
        656, 684, 676, 665, 683, 686, 703, 677, 687, 686, 686, 774, 654, 622, 680,
        700, 713, 709, 644, 677, 686, 679, 686, 669, 691, 655, 674, 694, 733, 663,
        674, 674, 677, 729, 668, 770, 643, 674, 677, 660, 776, 621, 648, 643, 630,
        691, 806, 659, 658, 687, 714, 680, 822, 634, 620, 635, 670, 671, 763, 635,
        599, 661, 683, 708, 728, 676, 705, 674, 670, 680, 688, 706, 689, 693, 665,
        719, 668, 657, 666, 667, 676, 863, 624, 634, 630, 637, 659, 721, 654, 673,
        683, 683, 726, 689, 746, 756, 622, 683, 724, 700, 646, 648, 594, 665, 685,
        739, 616, 683, 682, 689, 810, 734, 680, 653, 630, 615, 650, 683, 682, 683,
        683, 682, 683, 683, 682, 683, 682, 683, 683, 682, 683, 683, 682, 683, 682,
        683, 683, 682, 683, 683, 682, 683, 682, 683, 683, 692, 690, 666, 682, 683,
        682, 683, 683, 682, 683, 700, 703, 689, 688, 672, 690, 683, 691, 676, 663};
    uint32_t HE_AAC_1_64000[] =
    {0, 279, 279, 279, 284, 282, 281, 292, 286, 282, 357, 304, 292, 299, 268, 279, 272, 283, 274, 271, 268,
        288, 257, 289, 285, 277, 280, 285, 278, 290, 278, 287, 277, 329, 307, 257, 255, 264, 275, 266, 276,
        271, 272, 269, 270, 280, 286, 274, 284, 277, 286, 274, 280, 287, 278, 284, 285, 330, 283, 283, 283,
        290, 274, 276, 289, 274, 278, 274, 276, 272, 277, 292, 271, 272, 271, 274, 271, 262, 271, 282, 274,
        283, 285, 284, 277, 286, 276, 287, 288, 271, 280, 276, 286, 288, 281, 274, 318, 267, 270, 267, 271,
        275, 267, 269, 276, 279, 278, 272, 291, 262, 278, 291, 324, 284, 289, 281, 283, 273, 282, 305, 301,
        270, 255, 271, 266, 268, 271, 279, 286, 289, 275, 264, 278, 280, 279, 311, 272, 270, 271, 276, 274,
        282, 274, 282, 277, 275, 293, 280, 282, 275, 282, 273, 275, 279, 278, 284, 276, 281, 311, 316, 263,
        258, 263, 262, 275, 273, 276, 271, 306, 278, 283, 281, 282, 286, 289, 283, 273, 277, 278, 275, 283,
        277, 307, 282, 251, 300, 251, 270, 263, 301, 321, 257, 274, 279, 276, 268, 281, 300, 312, 254, 263,
        270, 262, 280, 275, 281, 281, 268, 273, 281, 278, 278, 280, 296, 282, 278, 277, 282, 273, 270, 284,
        333, 281, 276, 273, 276, 290, 289, 269, 317, 260, 280, 283, 276, 262, 289, 275, 269, 269, 275, 274,
        273, 286, 284, 287, 307, 297, 280, 286, 258, 271, 263, 298, 294, 268, 276, 275, 269, 269, 292, 317,
        297, 283, 275, 271, 265, 264, 260, 265, 277, 265, 261, 272, 271, 277, 327, 264, 261, 266, 269, 274,
        278, 276, 282, 279, 279, 275, 275, 276, 278, 274, 277, 280, 274, 304, 303, 278, 273, 278, 273, 284,
        279, 277, 274, 274, 286, 271, 271, 284, 278, 340, 268, 271, 272, 268, 278, 277, 272, 283, 284, 271,
        286, 332, 314, 265, 259, 263, 268, 272, 282, 275, 281, 269, 283, 272, 267, 280, 278, 276, 279, 289,
        338, 278, 271, 265, 266, 269, 278, 274, 270, 330, 322, 268, 262, 259, 269, 288, 267, 263, 287, 289,
        287, 287, 286, 293, 294, 270, 272, 266, 271, 280, 279, 265, 269, 270, 275, 279, 279, 276, 280, 273,
        277, 281, 274, 272, 283, 276, 277, 282, 281, 279, 276, 282, 279, 282, 288, 284, 309, 310, 290, 267,
        270, 261, 271, 273, 270, 272, 287, 327, 314, 255, 258, 265, 284, 277, 273, 279, 307, 269, 272, 270,
        272, 271, 285, 316, 282, 263, 283, 268, 275, 268, 278, 273, 277, 274, 288, 266, 277, 276, 279, 291,
        281, 270, 279, 271, 268, 280, 283, 292, 270, 274, 275, 276, 283, 283, 284, 282, 284, 279, 274, 283,
        277, 277, 277, 285, 275, 270, 280, 288, 279, 315, 334, 332, 253, 258, 266, 257, 279, 274, 280, 274,
        268, 271, 278, 270, 270, 274, 286, 290, 273, 271, 282, 272, 276, 274, 278, 273, 287, 273, 283, 273,
        279, 273, 280, 286, 286, 279, 277, 287, 298, 330, 269, 268, 280, 288, 276, 277, 273, 278, 269, 284,
        279, 294, 337, 266, 261, 270, 262, 264, 276, 281, 280, 275, 332, 259, 268, 263, 277, 279, 277, 285,
        279, 314, 271, 268, 265, 278, 283, 275, 280, 279, 278, 288, 282, 282, 285, 275, 283, 280, 279, 283,
        286, 275, 272, 285, 302, 299, 258, 321, 283, 277, 263, 263, 316, 288, 258, 259, 257, 264, 270, 289,
        293, 281, 277, 297, 287, 276, 273, 278, 276, 314, 259, 271, 264, 274, 276, 271, 285, 268, 260, 272,
        281, 274, 292, 328, 263, 274, 272, 273, 291, 282, 289, 277, 283, 272, 279, 268, 274, 275, 274, 291,
        273, 271, 267, 278, 278, 274, 276, 267, 279, 283, 285, 275, 281, 274, 280, 266, 283, 282, 284, 274,
        273, 282, 285, 280, 276, 277, 277, 303, 296, 271, 272, 266, 270, 278, 271, 283, 271, 310, 338, 265,
        262, 269, 268, 272, 271, 282, 271, 281, 286, 288, 279, 280, 277, 278, 273, 289, 303, 270, 272, 274,
        280, 283, 293, 277, 270, 284, 275, 275, 276, 282, 285, 299, 277, 267, 273, 280, 270, 288, 271, 281,
        286, 281, 290, 281, 284, 280, 281, 283, 287, 306, 311, 287, 289, 284, 273, 266, 269, 263, 262, 267,
        293, 308, 255, 261, 262, 264, 275, 280, 291, 269, 274, 275, 270, 274, 291, 275, 269, 273, 284, 283,
        284, 275, 277, 279, 279, 275, 288, 286, 275, 280, 284, 277, 291, 321, 277, 266, 287, 276, 261, 306,
        325, 289, 257, 258, 264, 267, 273, 276, 268, 277, 277, 289, 273, 280, 276, 284, 292, 283, 273, 265};
    uint32_t HE_AAC_2_64000[] =
    {0, 372, 372, 373, 372, 372, 373, 372, 372, 373, 377, 368, 373, 372, 373, 372, 372, 373, 372, 372, 373,
        372, 372, 373, 372, 373, 372, 372, 373, 372, 372, 373, 372, 372, 460, 332, 342, 356, 372, 373, 372,
        372, 373, 372, 372, 373, 372, 372, 373, 372, 373, 372, 372, 373, 372, 372, 373, 419, 348, 350, 372,
        372, 373, 372, 373, 372, 372, 373, 372, 372, 373, 372, 372, 391, 354, 373, 372, 372, 373, 372, 372,
        373, 372, 372, 373, 372, 372, 373, 372, 373, 372, 372, 373, 372, 372, 373, 467, 375, 315, 332, 373,
        372, 372, 373, 372, 372, 373, 372, 372, 373, 372, 372, 431, 330, 357, 372, 372, 373, 372, 390, 412,
        338, 349, 373, 372, 373, 372, 372, 373, 372, 372, 373, 372, 372, 373, 413, 370, 351, 356, 372, 372,
        372, 373, 372, 372, 373, 372, 372, 373, 372, 373, 372, 372, 373, 372, 372, 373, 372, 372, 437, 354,
        331, 368, 372, 373, 372, 372, 373, 372, 372, 373, 372, 372, 373, 372, 373, 372, 372, 373, 372, 372,
        373, 372, 372, 373, 372, 372, 373, 372, 373, 416, 359, 342, 372, 372, 373, 372, 372, 497, 352, 345,
        348, 362, 337, 366, 372, 373, 372, 372, 373, 372, 372, 373, 375, 373, 369, 372, 373, 372, 372, 373,
        413, 335, 369, 372, 373, 372, 372, 373, 426, 342, 349, 372, 372, 373, 372, 372, 373, 372, 373, 372,
        372, 373, 372, 372, 373, 372, 372, 373, 372, 373, 372, 372, 373, 372, 372, 373, 372, 372, 373, 395,
        448, 428, 421, 408, 389, 382, 365, 362, 370, 351, 337, 358, 349, 363, 424, 372, 362, 367, 363, 371,
        376, 377, 368, 366, 365, 359, 363, 359, 365, 358, 382, 362, 363, 393, 403, 371, 378, 377, 381, 385,
        378, 377, 372, 368, 371, 351, 359, 367, 356, 415, 378, 379, 381, 375, 382, 375, 369, 368, 376, 360,
        375, 422, 434, 359, 358, 356, 356, 376, 377, 376, 373, 374, 374, 367, 366, 376, 362, 362, 350, 366,
        400, 383, 372, 365, 370, 362, 361, 367, 359, 425, 414, 364, 361, 361, 367, 382, 359, 350, 397, 389,
        387, 369, 380, 400, 394, 374, 362, 351, 366, 374, 361, 353, 361, 363, 366, 371, 369, 373, 371, 366,
        371, 376, 364, 364, 377, 357, 368, 372, 374, 365, 366, 380, 370, 378, 384, 382, 409, 426, 400, 364,
        365, 356, 357, 359, 357, 358, 389, 427, 419, 342, 349, 359, 365, 367, 360, 358, 396, 365, 376, 366,
        367, 357, 377, 422, 382, 349, 380, 358, 367, 361, 356, 455, 350, 363, 376, 362, 368, 366, 365, 367,
        366, 365, 366, 364, 363, 370, 371, 377, 361, 370, 366, 363, 365, 367, 377, 360, 370, 368, 359, 365,
        364, 369, 369, 371, 364, 374, 368, 383, 372, 421, 427, 460, 348, 358, 365, 385, 366, 372, 364, 420,
        357, 358, 368, 359, 361, 367, 371, 380, 367, 360, 371, 360, 362, 362, 370, 365, 376, 370, 366, 367,
        366, 366, 372, 372, 374, 378, 370, 378, 408, 434, 367, 367, 377, 379, 374, 372, 368, 371, 357, 379,
        360, 394, 426, 350, 350, 371, 352, 351, 367, 366, 368, 365, 429, 358, 364, 355, 358, 362, 371, 369,
        370, 417, 371, 366, 371, 370, 377, 366, 378, 367, 380, 379, 368, 382, 378, 381, 373, 377, 381, 387,
        385, 382, 370, 368, 382, 388, 367, 410, 381, 379, 346, 353, 423, 385, 342, 345, 361, 349, 365, 385,
        379, 371, 362, 392, 371, 364, 360, 359, 364, 419, 357, 369, 354, 369, 370, 365, 392, 356, 346, 357,
        360, 358, 382, 433, 349, 366, 376, 366, 362, 368, 369, 397, 384, 382, 372, 358, 360, 368, 368, 379,
        360, 371, 360, 367, 374, 366, 359, 365, 366, 368, 372, 368, 374, 373, 365, 369, 374, 363, 375, 357,
        365, 364, 365, 373, 361, 390, 363, 409, 405, 378, 363, 354, 366, 364, 360, 376, 359, 409, 416, 364,
        361, 368, 361, 373, 375, 380, 369, 363, 378, 378, 373, 378, 379, 370, 361, 385, 398, 364, 360, 361,
        374, 372, 400, 368, 374, 375, 366, 371, 371, 366, 389, 389, 378, 361, 363, 370, 367, 383, 373, 374,
        376, 376, 390, 380, 379, 371, 363, 370, 365, 418, 437, 408, 397, 388, 372, 365, 362, 349, 343, 349,
        393, 428, 342, 341, 342, 345, 361, 357, 370, 349, 362, 361, 361, 363, 381, 361, 360, 362, 377, 373,
        378, 368, 372, 368, 375, 363, 381, 380, 370, 371, 375, 367, 394, 433, 374, 364, 377, 381, 353, 413,
        431, 389, 339, 347, 347, 364, 358, 367, 356, 365, 359, 382, 375, 371, 366, 383, 386, 366, 355, 360};
    uint32_t HE_AAC_1_88200[] =
    {0, 279, 279, 279, 326, 326, 336, 316, 306, 307, 294, 285, 288, 282, 277, 252, 251, 258, 265, 307, 256,
        305, 301, 291, 284, 281, 275, 277, 267, 266, 267, 269, 270, 269, 260, 274, 271, 272, 279, 274, 268,
        275, 281, 270, 281, 328, 316, 246, 262, 283, 257, 287, 277, 273, 276, 262, 270, 275, 268, 287, 270,
        278, 272, 270, 270, 271, 293, 286, 290, 285, 283, 290, 277, 289, 275, 278, 287, 299, 330, 271, 268,
        269, 273, 282, 287, 282, 281, 277, 276, 266, 277, 281, 276, 283, 272, 278, 281, 279, 288, 281, 293,
        261, 278, 285, 281, 274, 275, 272, 270, 279, 274, 283, 282, 279, 280, 281, 285, 275, 277, 282, 274,
        277, 276, 278, 277, 272, 290, 285, 293, 280, 274, 285, 315, 257, 250, 271, 265, 279, 279, 264, 275,
        282, 283, 280, 286, 283, 277, 274, 282, 270, 297, 273, 286, 323, 301, 267, 273, 271, 275, 285, 285,
        281, 291, 279, 325, 275, 265, 264, 276, 274, 279, 277, 276, 278, 277, 279, 284, 285, 280, 270, 280,
        278, 277, 275, 278, 309, 320, 259, 267, 264, 277, 269, 280, 268, 278, 271, 277, 277, 283, 278, 285,
        281, 280, 280, 285, 277, 277, 275, 275, 273, 281, 279, 285, 283, 289, 279, 277, 283, 319, 259, 274,
        269, 261, 261, 272, 270, 284, 272, 280, 278, 266, 279, 280, 293, 282, 287, 284, 281, 287, 285, 278,
        271, 281, 282, 280, 278, 279, 289, 277, 269, 286, 257, 266, 301, 306, 288, 288, 284, 280, 266, 289,
        313, 270, 262, 262, 267, 258, 262, 285, 288, 284, 290, 340, 252, 276, 260, 266, 285, 280, 271, 285,
        268, 297, 299, 273, 281, 268, 276, 285, 272, 266, 278, 282, 298, 278, 271, 278, 273, 268, 275, 275,
        274, 281, 288, 322, 267, 282, 274, 279, 275, 284, 292, 277, 279, 280, 325, 270, 266, 269, 275, 259,
        268, 283, 297, 286, 290, 279, 283, 276, 294, 268, 282, 280, 273, 270, 282, 284, 271, 284, 271, 288,
        276, 267, 272, 274, 283, 279, 294, 271, 275, 291, 289, 270, 271, 280, 280, 285, 296, 321, 311, 285,
        281, 260, 256, 267, 258, 272, 267, 273, 275, 287, 286, 271, 279, 278, 282, 278, 300, 327, 260, 260,
        269, 274, 265, 262, 269, 278, 281, 279, 275, 279, 279, 281, 284, 283, 273, 279, 286, 279, 283, 279,
        281, 282, 281, 278, 318, 291, 267, 267, 271, 282, 276, 279, 272, 280, 283, 279, 285, 276, 269, 282,
        281, 284, 277, 274, 279, 320, 316, 266, 263, 270, 275, 272, 278, 263, 273, 269, 285, 278, 278, 266,
        276, 294, 285, 328, 265, 271, 267, 272, 272, 279, 274, 285, 280, 280, 274, 281, 280, 277, 278, 280,
        281, 275, 277, 280, 275, 274, 273, 293, 354, 275, 273, 266, 265, 274, 267, 271, 283, 266, 280, 279,
        301, 325, 318, 258, 256, 258, 262, 260, 274, 282, 274, 275, 275, 287, 293, 286, 283, 285, 286, 284,
        288, 277, 283, 272, 276, 269, 276, 274, 296, 272, 281, 273, 273, 272, 274, 279, 273, 279, 286, 280,
        277, 288, 281, 277, 283, 274, 280, 274, 275, 284, 277, 276, 274, 277, 276, 274, 271, 277, 281, 282,
        287, 274, 287, 280, 290, 294, 303, 308, 283, 268, 267, 271, 272, 272, 274, 267, 278, 268, 279, 267,
        342, 275, 314, 262, 260, 267, 273, 277, 280, 272, 274, 272, 289, 302, 276, 283, 276, 272, 272, 273,
        275, 277, 287, 333, 256, 263, 268, 275, 271, 268, 272, 273, 273, 272, 293, 282, 283, 277, 296, 281,
        271, 271, 280, 277, 282, 284, 279, 280, 276, 280, 274, 274, 285, 281, 287, 282, 274, 280, 279, 274,
        279, 273, 272, 285, 280, 289, 292, 281, 295, 275, 274, 280, 281, 277, 275, 280, 277, 292, 277, 266,
        277, 278, 274, 304, 271, 279, 293, 274, 268, 300, 271, 273, 276, 279, 271, 277, 280, 280, 277, 287,
        275, 291, 268, 274, 283, 274, 278, 278, 287, 294, 295, 293, 281, 270, 270, 281, 273, 281, 273, 275,
        285, 269, 277, 275, 268, 279, 282, 283, 277, 273, 281, 280, 267, 285, 290, 281, 284, 280, 284, 310,
        278, 294, 276, 264, 271, 271, 277, 277, 269, 276, 273, 271, 273, 270, 275, 291, 292, 274, 345, 299,
        273, 262, 268, 272, 265, 279, 276, 280, 275, 269, 294, 286, 289, 299, 268, 268, 271, 271, 282, 280,
        283, 274, 283, 278, 297, 320, 271, 269, 275, 269, 275, 277, 271, 283, 284, 278, 271, 282, 281, 285,
        283, 284, 295, 275, 283, 266, 297, 287, 271, 282, 276, 266, 281, 272, 281, 280, 271, 305, 326, 271};
    uint32_t HE_AAC_2_88200[] =
    {0, 372, 372, 373, 372, 372, 373, 372, 372, 373, 372, 372, 373, 372, 378, 368, 372, 373, 372, 374, 371,
        380, 386, 381, 379, 371, 372, 379, 371, 350, 359, 368, 372, 372, 373, 372, 372, 373, 372, 373, 372,
        372, 373, 372, 372, 391, 480, 347, 346, 381, 338, 394, 376, 375, 356, 362, 338, 357, 372, 392, 376,
        366, 366, 369, 366, 372, 372, 373, 376, 368, 378, 371, 368, 378, 367, 373, 376, 388, 413, 365, 363,
        379, 361, 371, 382, 369, 380, 357, 361, 348, 372, 372, 373, 387, 392, 372, 365, 350, 368, 386, 413,
        338, 383, 342, 381, 385, 372, 351, 372, 373, 372, 373, 372, 373, 372, 372, 372, 373, 372, 372, 373,
        372, 373, 372, 372, 373, 372, 372, 374, 371, 372, 379, 415, 352, 344, 372, 373, 386, 392, 358, 376,
        377, 375, 366, 379, 366, 369, 367, 368, 370, 364, 372, 372, 430, 414, 331, 321, 374, 365, 381, 373,
        385, 383, 388, 455, 389, 350, 342, 347, 392, 396, 381, 377, 379, 382, 364, 390, 348, 386, 334, 374,
        378, 377, 379, 366, 391, 452, 365, 359, 362, 379, 364, 361, 361, 365, 358, 356, 364, 347, 349, 380,
        369, 371, 358, 378, 368, 359, 360, 359, 359, 372, 373, 372, 372, 373, 372, 372, 373, 396, 356, 365,
        372, 373, 372, 372, 373, 378, 366, 380, 365, 373, 372, 372, 373, 372, 372, 373, 383, 365, 374, 374,
        366, 372, 372, 373, 372, 372, 373, 372, 372, 375, 370, 372, 376, 394, 384, 393, 369, 365, 366, 391,
        462, 330, 360, 369, 350, 372, 366, 362, 384, 364, 385, 428, 361, 378, 341, 349, 384, 388, 380, 352,
        380, 396, 408, 363, 376, 346, 365, 398, 365, 355, 377, 374, 413, 368, 337, 371, 367, 324, 371, 366,
        374, 365, 381, 418, 372, 346, 372, 368, 357, 344, 362, 360, 372, 373, 480, 347, 339, 343, 353, 372,
        372, 373, 372, 372, 373, 373, 372, 372, 379, 366, 389, 355, 373, 372, 372, 385, 376, 361, 368, 396,
        355, 378, 360, 374, 371, 372, 393, 373, 369, 386, 388, 363, 373, 370, 376, 384, 409, 450, 422, 410,
        398, 368, 364, 371, 350, 371, 355, 350, 363, 365, 369, 347, 360, 364, 359, 358, 395, 434, 366, 361,
        369, 369, 367, 357, 364, 374, 374, 384, 373, 370, 369, 361, 371, 377, 370, 377, 368, 368, 375, 368,
        373, 373, 372, 369, 428, 412, 365, 373, 365, 375, 370, 374, 366, 370, 374, 371, 375, 372, 370, 380,
        370, 373, 364, 359, 359, 420, 435, 364, 359, 361, 370, 366, 374, 359, 367, 362, 376, 358, 368, 359,
        367, 381, 370, 445, 355, 364, 358, 365, 365, 376, 372, 371, 366, 372, 361, 362, 368, 371, 378, 381,
        372, 374, 365, 371, 365, 369, 362, 370, 441, 384, 378, 371, 364, 365, 366, 374, 378, 358, 360, 372,
        394, 450, 430, 349, 342, 341, 352, 347, 360, 368, 358, 364, 371, 382, 390, 385, 377, 395, 382, 375,
        387, 376, 369, 366, 372, 360, 364, 361, 389, 368, 364, 368, 366, 369, 358, 368, 366, 369, 369, 374,
        371, 374, 373, 381, 372, 368, 368, 366, 370, 377, 364, 365, 366, 370, 370, 366, 365, 366, 377, 367,
        376, 363, 367, 365, 378, 404, 432, 435, 384, 355, 355, 366, 354, 359, 363, 355, 369, 358, 362, 357,
        454, 362, 414, 355, 348, 361, 361, 365, 371, 366, 364, 364, 401, 412, 374, 374, 360, 366, 365, 373,
        364, 373, 385, 436, 354, 352, 353, 350, 352, 351, 358, 357, 359, 363, 413, 375, 370, 369, 388, 372,
        373, 369, 376, 373, 367, 370, 366, 376, 371, 378, 365, 373, 384, 369, 379, 379, 366, 368, 377, 365,
        370, 366, 365, 372, 365, 377, 387, 367, 368, 373, 368, 371, 375, 365, 368, 366, 367, 381, 368, 361,
        368, 367, 360, 399, 370, 390, 403, 365, 374, 388, 370, 372, 373, 373, 370, 384, 374, 376, 374, 395,
        390, 378, 359, 370, 367, 365, 373, 368, 369, 387, 381, 396, 373, 359, 363, 376, 367, 376, 362, 355,
        380, 364, 368, 360, 367, 360, 372, 372, 370, 368, 372, 367, 360, 366, 374, 372, 377, 369, 366, 425,
        377, 403, 368, 363, 357, 364, 372, 378, 359, 365, 362, 368, 366, 358, 361, 378, 374, 368, 460, 417,
        360, 359, 348, 365, 355, 364, 373, 370, 376, 356, 371, 369, 384, 401, 370, 368, 369, 368, 365, 364,
        374, 359, 375, 367, 396, 447, 363, 365, 366, 365, 371, 372, 369, 380, 381, 373, 367, 371, 374, 379,
        381, 388, 387, 368, 380, 362, 399, 389, 366, 374, 380, 366, 381, 365, 362, 365, 369, 402, 432, 369};
        uint32_t HEv2_AAC_2_96000[] =
    {0, 279, 279, 279, 328, 361, 335, 315, 311, 295, 300, 289, 284, 276, 282, 304, 276, 284, 283, 231, 228,
        311, 307, 300, 294, 294, 285, 268, 271, 265, 275, 260, 244, 282, 279, 279, 271, 249, 270, 262, 266,
        277, 273, 277, 268, 281, 273, 271, 280, 281, 312, 253, 261, 273, 276, 261, 323, 306, 307, 284, 291,
        269, 271, 268, 274, 289, 278, 266, 279, 267, 277, 293, 276, 269, 290, 280, 268, 291, 262, 277, 270,
        274, 271, 284, 276, 280, 314, 271, 273, 278, 278, 281, 277, 279, 283, 275, 288, 282, 273, 272, 283,
        282, 275, 278, 281, 278, 285, 282, 274, 303, 303, 273, 270, 279, 279, 269, 268, 281, 271, 284, 272,
        275, 276, 281, 274, 275, 282, 279, 274, 283, 278, 280, 276, 274, 281, 287, 283, 283, 292, 270, 289,
        272, 291, 271, 310, 312, 247, 254, 308, 250, 261, 314, 293, 276, 274, 288, 263, 291, 280, 266, 280,
        266, 267, 284, 282, 270, 279, 273, 323, 258, 274, 273, 273, 276, 283, 284, 278, 280, 276, 292, 267,
        271, 304, 253, 273, 309, 297, 285, 281, 288, 277, 274, 273, 282, 277, 275, 268, 280, 280, 274, 280,
        276, 273, 330, 253, 262, 284, 285, 264, 279, 283, 282, 275, 276, 267, 277, 276, 280, 277, 292, 275,
        280, 278, 282, 273, 278, 271, 278, 288, 283, 273, 275, 287, 282, 284, 277, 280, 277, 321, 255, 302,
        278, 273, 273, 269, 286, 274, 277, 267, 290, 270, 266, 282, 281, 299, 279, 272, 304, 290, 261, 277,
        302, 284, 261, 271, 270, 266, 280, 267, 284, 281, 273, 284, 311, 302, 263, 247, 304, 305, 249, 306,
        299, 280, 271, 281, 291, 262, 260, 261, 265, 268, 287, 282, 287, 279, 279, 272, 289, 259, 253, 296,
        271, 270, 299, 298, 289, 291, 279, 289, 274, 279, 274, 287, 276, 286, 270, 274, 280, 271, 278, 297,
        276, 267, 273, 276, 283, 276, 273, 275, 275, 273, 311, 291, 273, 265, 286, 275, 286, 276, 275, 279,
        277, 282, 273, 307, 258, 272, 265, 270, 271, 281, 280, 289, 286, 280, 282, 287, 291, 276, 292, 268,
        282, 282, 279, 274, 271, 278, 303, 274, 266, 273, 301, 272, 276, 286, 270, 277, 298, 273, 280, 272,
        280, 273, 309, 266, 268, 273, 278, 288, 282, 308, 318, 288, 292, 282, 266, 261, 258, 256, 267, 275,
        268, 288, 293, 301, 284, 271, 276, 278, 291, 279, 292, 306, 263, 260, 265, 267, 271, 263, 270, 271,
        287, 279, 285, 282, 285, 299, 273, 278, 284, 280, 288, 269, 281, 281, 268, 271, 279, 278, 284, 278,
        315, 269, 260, 279, 272, 281, 276, 286, 279, 273, 275, 278, 284, 279, 278, 298, 287, 290, 287, 271,
        277, 270, 273, 280, 332, 270, 264, 253, 277, 272, 282, 279, 279, 284, 274, 299, 288, 285, 280, 273,
        303, 296, 303, 304, 256, 254, 261, 259, 271, 282, 273, 266, 280, 271, 280, 277, 274, 275, 275, 283,
        280, 280, 282, 279, 282, 288, 273, 280, 279, 283, 332, 270, 263, 273, 273, 270, 274, 272, 273, 272,
        282, 290, 284, 298, 291, 319, 271, 257, 263, 269, 268, 270, 276, 278, 280, 270, 275, 288, 293, 289,
        292, 277, 292, 279, 279, 269, 274, 277, 279, 279, 278, 280, 271, 283, 286, 282, 270, 277, 271, 278,
        280, 281, 280, 276, 287, 284, 281, 276, 281, 280, 285, 273, 282, 271, 278, 276, 272, 279, 287, 270,
        280, 283, 276, 277, 281, 276, 273, 278, 271, 284, 280, 273, 273, 290, 302, 317, 287, 284, 261, 264,
        267, 266, 275, 270, 276, 279, 286, 270, 278, 283, 291, 284, 269, 306, 263, 276, 281, 284, 271, 286,
        282, 276, 285, 277, 315, 307, 264, 268, 267, 273, 276, 277, 280, 295, 279, 315, 266, 259, 255, 310,
        288, 258, 269, 271, 272, 271, 277, 276, 302, 271, 272, 283, 275, 272, 286, 271, 280, 271, 279, 298,
        291, 281, 280, 268, 268, 269, 269, 281, 291, 283, 279, 286, 273, 282, 273, 285, 275, 271, 283, 302,
        286, 285, 304, 284, 280, 276, 282, 276, 274, 272, 274, 283, 278, 271, 267, 288, 282, 271, 267, 272,
        291, 273, 279, 291, 271, 267, 272, 303, 284, 266, 276, 278, 269, 285, 271, 276, 284, 274, 272, 289,
        280, 275, 285, 280, 281, 274, 278, 282, 275, 283, 293, 292, 292, 279, 267, 285, 283, 281, 282, 273,
        281, 278, 271, 273, 268, 278, 270, 288, 300, 284, 278, 277, 276, 279, 282, 284, 280, 282, 290, 274,
        280, 277, 292, 269, 271, 286, 272, 270, 279, 276, 276, 271, 279, 273, 280, 283, 272, 281, 279, 281};
}

bool CheckDecDesc(map<string, int> BaseDesc, struct OH_AVCodec* audDec){
    OH_AVFormat* OutDesc = OH_AudioDecoder_GetOutputDescription(audDec);
    cout << "OutDesc: " << OutDesc << endl;
    if(OutDesc == nullptr){
        cout << "OH_AVCODEC_AudioDecoderGetOutputMediaDescription err. " << endl;
        return false;
    }

    int32_t out ;
    for(const auto& t: BaseDesc){
         bool res = OH_AVFormat_GetIntValue(OutDesc, t.first.c_str(), &out);
         cout << "key: " << t.first << "; out: " << out << endl;
        if(!res){
            cout << "OH_AVFormat_GetIntValue Fail. key:" << t.first << endl;
            return false;
        }
        if(out != t.second){
            cout << "OH_AVFormat_GetIntValue error. key: " << t.first
            << "; expect: " << t.second
            << ", actual: " << out << endl;
            return false;
        }
        out = 0;
    }
    return true;
}

void audioDecoderProcess(map<string, int> AudioDecFormatParam, const char * out_dir,
                         uint32_t es[], uint32_t es_length, const char * inp_dir){
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init(out_dir, es, es_length, inp_dir);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecFormatParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(true, CheckDecDesc(AudioDecFormatParam, audDec));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    aDecSample->WaitEOS();
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest001
 * @tc.name      : Test basic audio decode function
 * @tc.desc      : Basic function test
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest001, Function | MediumTest | Level0)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_001.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);
//    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
//    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
//    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    //while(aDecSample->GetFrameCount() < 300){};
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest002
 * @tc.name      : test audioDecoder config -> reset
 * @tc.desc      : Basic function test: create - config - reset - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest002, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_002.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest003
 * @tc.name      : test audioDecoder config -> release
 * @tc.desc      : Basic function test: create - config - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest003, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_003.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest004
 * @tc.name      : test audioDecoder create -> release
 * @tc.desc      : Basic function test: create - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest004, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_004.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);
    ASSERT_EQ(AV_ERR_OK, OH_AudioDecoder_Destroy(audDec));
    audDec = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest005
 * @tc.name      : test audioDecoder start -> release
 * @tc.desc      : Basic function test: create - config - prepare - start - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest005, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_005.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest006
 * @tc.name      : test audioDecoder prepare -> reset
 * @tc.desc      : Basic function test: create - config - prepare - reset - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest006, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_006.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest007
 * @tc.name      : test audioDecoder prepare -> release
 * @tc.desc      : Basic function test: create - config - prepare - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest007, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_007.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest008
 * @tc.name      : test audioDecoder config -> reset -> config
 * @tc.desc      : Basic function test: create - config - reset - config - prepare - start - stop - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest008, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_008.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    //while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest009
 * @tc.name      : test audioDecoder start -> eos
 * @tc.desc      : Basic function test: create - config - prepare - start - EOS - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest009, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_009.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    // 等待EOS
    aDecSample->WaitEOS();
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest010
 * @tc.name      : test audioDecoder start - reset
 * @tc.desc      : Basic function test: create - config - prepare - start - reset - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest010, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_010.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest011
 * @tc.name      : test audioDecoder start -> flush - start
 * @tc.desc      : Basic function test: create - config - prepare - start - flush - start - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest011, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_011.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest012
 * @tc.name      : test audioDecoder prepare - reset - config
 * @tc.desc      : Basic function test: create - config - prepare - reset - config - prepare - start - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest012, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_012.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    //while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest013
 * @tc.name      : test audioDecoder eos - flush
 * @tc.desc      : Basic function test: create - config - prepare - start - eos - flush - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest013, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_013.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    aDecSample->WaitEOS();
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    sleep(1);
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest014
 * @tc.name      : test audioDecoder eos - stop
 * @tc.desc      : Basic function test: create - config - prepare - start - eos - stop - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest014, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_014.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    aDecSample->WaitEOS();
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}


/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest015
 * @tc.name      : test audioDecoder eos - reset
 * @tc.desc      : Basic function test: create - config - prepare - start - eos - reset - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest015, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_015.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    aDecSample->WaitEOS();
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest016
 * @tc.name      : test audioDecoder stop - start
 * @tc.desc      : Basic function test: create - config - prepare - start - stop - start - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest016, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_016.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest017
 * @tc.name      : test audioDecoder start - stop - reset
 * @tc.desc      : Basic function test: create - config - prepare - start - stop - reset - config - prepare - start - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest017, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_017.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest018
 * @tc.name      : test audioDecoder start - reset - config
 * @tc.desc      : Basic function test: create - config - prepare - start - reset - config - prepare - start - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest018, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_018.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest019
 * @tc.name      : test audioDecoder flush - start - eos
 * @tc.desc      : Basic function test: create - config - prepare - start - flush - start - eos - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest019, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_019.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    aDecSample->WaitEOS();
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest020
 * @tc.name      : test audioDecoder flsh - stop
 * @tc.desc      : Basic function test: create - config - prepare - start - flush - stop - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest020, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_020.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    cout << "audDec " << audDec << endl;
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest021
 * @tc.name      : test audioDecoder flush - reset
 * @tc.desc      : Basic function test: create - config - prepare - start - flush - reset - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest021, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_021.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest022
 * @tc.name      : test audioDecoder flush - start - flush - start
 * @tc.desc      : Basic function test: create - config - prepare - start - flush - start - flush - start - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest022, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_022.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 800){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest023
 * @tc.name      : test audioDecoder flush - release
 * @tc.desc      : Basic function test: create - config - prepare - start - flush - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest023, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_023.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    sleep(1);
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest024
 * @tc.name      : test audioDecoder flush - start - stop
 * @tc.desc      : Basic function test: create - config - prepare - start - flush - start - stop - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest024, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_024.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest025
 * @tc.name      : test audioDecoder flush - start - stop
 * @tc.desc      : Basic function test: create - config - prepare - start - flush - start - stop - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest025, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_025.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    sleep(1);
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest026
 * @tc.name      : test audioDecoder flush - reset - config
 * @tc.desc      : Basic function test: create - config - prepare - start - flush - reset - config - prepare - start - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest026, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_026.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest027
 * @tc.name      : test audioDecoder eos - stop - reset
 * @tc.desc      : Basic function test: create - config - prepare - start - eos - stop - reset - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest027, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_027.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1); 

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    aDecSample->WaitEOS();
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest028
 * @tc.name      : test audioDecoder eos - stop - start
 * @tc.desc      : Basic function test: create - config - prepare - start - eos - stop - start - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest028, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_028.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    aDecSample->WaitEOS();
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    aDecSample->resetFrameCount();
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest029
 * @tc.name      : test audioDecoder eos - flush - start
 * @tc.desc      : Basic function test: create - config - prepare - start - eos - flush - start - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest029, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_029.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    aDecSample->WaitEOS();
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    aDecSample->resetFrameCount();
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest030
 * @tc.name      : test audioDecoder createByName
 * @tc.desc      : Basic function test: create - config - prepare - start - eos - stop - reset - release
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest030, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample  = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_030.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder(1);
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    OH_AVFormat_SetIntValue(AudioFormat, "channel_count", 2);
    OH_AVFormat_SetIntValue(AudioFormat, "sample_rate", 44100);
    OH_AVFormat_SetIntValue(AudioFormat, "audio_sample_format", 1);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    aDecSample->WaitEOS();
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFuncTest031
 * @tc.name      : test audioDecoder get outputMediaDescription
 * @tc.desc      : Basic function test
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFuncTest031, Function | MediumTest | Level1)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_out_031.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    cout << "audDec " << audDec << endl;
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(true, CheckDecDesc(AudioDecParam, audDec));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(true, CheckDecDesc(AudioDecParam, audDec));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    ASSERT_EQ(true, CheckDecDesc(AudioDecParam, audDec));
    //while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(true, CheckDecDesc(AudioDecParam, audDec));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest001
 * @tc.name      : test audioDecoder format HE_AAC_1ch_24ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest001
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest001, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_HE_AAC_1_24000 = sizeof(HE_AAC_1_24000)/sizeof(uint32_t);
    map<string, int> AudioDecParam001 = {
        {"channel_count", 1},
        {"sample_rate", 24000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam001, "/data/media/HE_AAC_1_24000_out.es", HE_AAC_1_24000,
                     ES_LEN_HE_AAC_1_24000, "/data/media/HE_AAC_1_24000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest002
 * @tc.name      : test audioDecoder format HE_AAC_1ch_32ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest002
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest002, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_HE_AAC_1_32000 = sizeof(HE_AAC_1_32000)/sizeof(uint32_t);
    map<string, int> AudioDecParam002 = {
        {"channel_count", 1},
        {"sample_rate", 32000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam002, "/data/media/HE_AAC_1_32000_out.es", HE_AAC_1_32000,
                     ES_LEN_HE_AAC_1_32000, "/data/media/HE_AAC_1_32000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest003
 * @tc.name      : test audioDecoder format HE_AAC_1ch_44.1ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest003
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest003, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_HE_AAC_1_44100 = sizeof(HE_AAC_1_44100)/sizeof(uint32_t);
    map<string, int> AudioDecParam003 = {
        {"channel_count", 1},
        {"sample_rate", 44100},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam003, "/data/media/HE_AAC_1_44100_out.es", HE_AAC_1_44100,
                     ES_LEN_HE_AAC_1_44100, "/data/media/HE_AAC_1_44100.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest004
 * @tc.name      : test audioDecoder format HE_AAC_1ch_48ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest004
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest004, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_HE_AAC_1_48000 = sizeof(HE_AAC_1_48000)/sizeof(uint32_t);
    map<string, int> AudioDecParam004 = {
        {"channel_count", 1},
        {"sample_rate", 48000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam004, "/data/media/HE_AAC_1_48000_out.es", HE_AAC_1_48000,
                     ES_LEN_HE_AAC_1_48000, "/data/media/HE_AAC_1_48000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest005
 * @tc.name      : test audioDecoder format HE_AAC_1ch_64ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest005
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest005, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_HE_AAC_1_64000 = sizeof(HE_AAC_1_64000)/sizeof(uint32_t);
    map<string, int> AudioDecParam005 = {
        {"channel_count", 1},
        {"sample_rate", 64000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam005, "/data/media/HE_AAC_1_64000_out.es", HE_AAC_1_64000,
                     ES_LEN_HE_AAC_1_64000, "/data/media/HE_AAC_1_64000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest006
 * @tc.name      : test audioDecoder format HE_AAC_1ch_88.2ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest006
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest006, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_HE_AAC_1_88200 = sizeof(HE_AAC_1_88200)/sizeof(uint32_t);
    map<string, int> AudioDecParam006 = {
        {"channel_count", 1},
        {"sample_rate", 88200},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam006, "/data/media/HE_AAC_1_88200_out.es", HE_AAC_1_88200,
                     ES_LEN_HE_AAC_1_88200, "/data/media/HE_AAC_1_88200.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest007
 * @tc.name      : test audioDecoder format HE_AAC_2ch_24ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest007
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest007, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_HE_AAC_2_24000 = sizeof(HE_AAC_2_24000)/sizeof(uint32_t);
    map<string, int> AudioDecParam007 = {
        {"channel_count", 2},
        {"sample_rate", 24000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam007, "/data/media/HE_AAC_2_24000_out.es", HE_AAC_2_24000,
                     ES_LEN_HE_AAC_2_24000, "/data/media/HE_AAC_2_24000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest008
 * @tc.name      : test audioDecoder format HE_AAC_2ch_32ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest008
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest008, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_HE_AAC_2_32000 = sizeof(HE_AAC_2_32000)/sizeof(uint32_t);
    map<string, int> AudioDecParam008 = {
        {"channel_count", 2},
        {"sample_rate", 32000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam008, "/data/media/HE_AAC_2_32000_out.es", HE_AAC_2_32000,
                     ES_LEN_HE_AAC_2_32000, "/data/media/HE_AAC_2_32000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest009
 * @tc.name      : test audioDecoder format HE_AAC_2ch_44.1ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest009
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest009, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_HE_AAC_2_44100 = sizeof(HE_AAC_2_44100)/sizeof(uint32_t);
    map<string, int> AudioDecParam009 = {
        {"channel_count", 2},
        {"sample_rate", 44100},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam009, "/data/media/HE_AAC_2_44100_out.es", HE_AAC_2_44100,
                     ES_LEN_HE_AAC_2_44100, "/data/media/HE_AAC_2_44100.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest010
 * @tc.name      : test audioDecoder format HE_AAC_2ch_48ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest010
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest010, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_HE_AAC_2_48000 = sizeof(HE_AAC_2_48000)/sizeof(uint32_t);
    map<string, int> AudioDecParam010 = {
        {"channel_count", 2},
        {"sample_rate", 48000},
        {"audio_sample_format", 1},
    };

     audioDecoderProcess(AudioDecParam010, "/data/media/HE_AAC_2_48000_out.es", HE_AAC_2_48000,
                     ES_LEN_HE_AAC_2_48000, "/data/media/HE_AAC_2_48000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest011
 * @tc.name      : test audioDecoder format HE_AAC_2ch_64ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest011
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest011, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_HE_AAC_2_64000 = sizeof(HE_AAC_2_64000)/sizeof(uint32_t);
    map<string, int> AudioDecParam011 = {
        {"channel_count", 2},
        {"sample_rate", 64000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam011, "/data/media/HE_AAC_2_64000_out.es", HE_AAC_2_64000,
                     ES_LEN_HE_AAC_2_64000, "/data/media/HE_AAC_2_64000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest012
 * @tc.name      : test audioDecoder format HE_AAC_2ch_88.2ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest012
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest012, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_HE_AAC_2_88200 = sizeof(HE_AAC_2_88200)/sizeof(uint32_t);
    map<string, int> AudioDecParam012 = {
        {"channel_count", 2},
        {"sample_rate", 88200},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam012, "/data/media/HE_AAC_2_88200_out.es", HE_AAC_2_88200,
                     ES_LEN_HE_AAC_2_88200, "/data/media/HE_AAC_2_88200.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest013
 * @tc.name      : test audioDecoder format HEv2_AAC_2ch_96ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest013
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest013, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_HEv2_AAC_2_96000 = sizeof(HEv2_AAC_2_96000)/sizeof(uint32_t);
    map<string, int> AudioDecParam013 = {
        {"channel_count", 2},
        {"sample_rate", 96000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam013, "/data/media/HEv2_AAC_2_96000_out.es", HEv2_AAC_2_96000,
                     ES_LEN_HEv2_AAC_2_96000, "/data/media/HEv2_AAC_2_96000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest014
 * @tc.name      : test audioDecoder format LC_AAC_1ch_11.025ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest014
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest014, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_LC_AAC_1_11025 = sizeof(LC_AAC_1_11025)/sizeof(uint32_t);
    map<string, int> AudioDecParam014 = {
        {"channel_count", 1},
        {"sample_rate", 11025},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam014, "/data/media/LC_AAC_1_11025_out.es", LC_AAC_1_11025,
                     ES_LEN_LC_AAC_1_11025, "/data/media/LC_AAC_1_11025.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest015
 * @tc.name      : test audioDecoder format LC_AAC_1ch_12ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest015
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest015, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_LC_AAC_1_12000 = sizeof(LC_AAC_1_12000)/sizeof(uint32_t);
    map<string, int> AudioDecParam015 = {
        {"channel_count", 1},
        {"sample_rate", 12000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam015, "/data/media/LC_AAC_1_12000_out.es", LC_AAC_1_12000,
                     ES_LEN_LC_AAC_1_12000, "/data/media/LC_AAC_1_12000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest016
 * @tc.name      : test audioDecoder format LC_AAC_1ch_16ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest016
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest016, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_LC_AAC_1_16000 = sizeof(LC_AAC_1_16000)/sizeof(uint32_t);
    map<string, int> AudioDecParam016 = {
        {"channel_count", 1},
        {"sample_rate", 16000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam016, "/data/media/LC_AAC_1_16000_out.es", LC_AAC_1_16000,
                     ES_LEN_LC_AAC_1_16000, "/data/media/LC_AAC_1_16000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest017
 * @tc.name      : test audioDecoder format LC_AAC_1ch_22.05ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest017
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest017, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_LC_AAC_1_22050 = sizeof(LC_AAC_1_22050)/sizeof(uint32_t);
    map<string, int> AudioDecParam017 = {
        {"channel_count", 1},
        {"sample_rate", 22050},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam017, "/data/media/LC_AAC_1_22050_out.es", LC_AAC_1_22050,
                     ES_LEN_LC_AAC_1_22050, "/data/media/LC_AAC_1_22050.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest018
 * @tc.name      : test audioDecoder format LC_AAC_1ch_8ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest018
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest018, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_LC_AAC_1_8000 = sizeof(LC_AAC_1_8000)/sizeof(uint32_t);
    map<string, int> AudioDecParam018 = {
        {"channel_count", 1},
        {"sample_rate", 8000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam018, "/data/media/LC_AAC_1_8000_out.es", LC_AAC_1_8000,
                     ES_LEN_LC_AAC_1_8000, "/data/media/LC_AAC_1_8000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest019
 * @tc.name      : test audioDecoder format LC_AAC_1ch_96ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest019
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest019, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_LC_AAC_1_96000 = sizeof(LC_AAC_1_96000)/sizeof(uint32_t);
    map<string, int> AudioDecParam019 = {
        {"channel_count", 1},
        {"sample_rate", 96000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam019, "/data/media/LC_AAC_1_96000_out.es", LC_AAC_1_96000,
                     ES_LEN_LC_AAC_1_96000, "/data/media/LC_AAC_1_96000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest020
 * @tc.name      : test audioDecoder format LC_AAC_2ch_11.025ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest020
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest020, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_LC_AAC_2_11025 = sizeof(LC_AAC_2_11025)/sizeof(uint32_t);
    map<string, int> AudioDecParam020 = {
        {"channel_count", 2},
        {"sample_rate", 11025},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam020, "/data/media/LC_AAC_2_11025_out.es", LC_AAC_2_11025,
                     ES_LEN_LC_AAC_2_11025, "/data/media/LC_AAC_2_11025.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest021
 * @tc.name      : test audioDecoder format LC_AAC_2ch_12ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest021
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest021, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_LC_AAC_2_12000 = sizeof(LC_AAC_2_12000)/sizeof(uint32_t);
    map<string, int> AudioDecParam021 = {
        {"channel_count", 2},
        {"sample_rate", 12000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam021, "/data/media/LC_AAC_2_12000_out.es", LC_AAC_2_12000,
                     ES_LEN_LC_AAC_2_12000, "/data/media/LC_AAC_2_12000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest022
 * @tc.name      : test audioDecoder format LC_AAC_2ch_16ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest022
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest022, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_LC_AAC_2_16000 = sizeof(LC_AAC_2_16000)/sizeof(uint32_t);
    map<string, int> AudioDecParam022 = {
        {"channel_count", 2},
        {"sample_rate", 16000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam022, "/data/media/LC_AAC_2_16000_out.es", LC_AAC_2_16000,
                     ES_LEN_LC_AAC_2_16000, "/data/media/LC_AAC_2_16000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest023
 * @tc.name      : test audioDecoder format LC_AAC_2ch_22.05ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest023
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest023, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_LC_AAC_2_22050 = sizeof(LC_AAC_2_22050)/sizeof(uint32_t);
    map<string, int> AudioDecParam023 = {
        {"channel_count", 2},
        {"sample_rate", 22050},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam023, "/data/media/LC_AAC_2_22050_out.es", LC_AAC_2_22050,
                     ES_LEN_LC_AAC_2_22050, "/data/media/LC_AAC_2_22050.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest024
 * @tc.name      : test audioDecoder format LC_AAC_2ch_8ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest024
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest024, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_LC_AAC_2_8000= sizeof(LC_AAC_2_8000)/sizeof(uint32_t);
    map<string, int> AudioDecParam024 = {
        {"channel_count", 2},
        {"sample_rate", 8000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam024, "/data/media/LC_AAC_2_8000_out.es", LC_AAC_2_8000,
                     ES_LEN_LC_AAC_2_8000, "/data/media/LC_AAC_2_8000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkFormatTest025
 * @tc.name      : test audioDecoder format LC_AAC_2ch_96ksr
 * @tc.desc      : ActsAudioDecoderNdkFormatTest025
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkFormatTest025, Function | MediumTest | Level2)
{
    uint32_t ES_LEN_LC_AAC_2_96000= sizeof(LC_AAC_2_96000)/sizeof(uint32_t);
    map<string, int> AudioDecParam025 = {
        {"channel_count", 2},
        {"sample_rate", 96000},
        {"audio_sample_format", 1},
    };

    audioDecoderProcess(AudioDecParam025, "/data/media/LC_AAC_2_96000_out.es", LC_AAC_2_96000,
                     ES_LEN_LC_AAC_2_96000, "/data/media/LC_AAC_2_96000.aac");
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest001
 * @tc.name      : test audioDecorder prepare -> configErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest001
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest001, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out001.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest002
 * @tc.name      : test audioDecorder start -> configErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest002
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest002, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out002.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Configure(AudioFormat));
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest003
 * @tc.name      : test audioDecorder flush -> configErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest003
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest003, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out003.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Configure(AudioFormat));
    while(aDecSample->GetFrameCount() < 800){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest004
 * @tc.name      : test audioDecorder stop -> configErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest004
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest004, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out004.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest005
 * @tc.name      : test audioDecorder reset -> configErr -> prepareErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest005
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest005, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out005.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    OH_AVFormat *AudioDecErrFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);
    aDecSample->SetFormat(AudioDecErrFormat, AudioDecErrParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioDecErrFormat));
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest006
 * @tc.name      : test audioDecorder eos -> configErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest006
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest006, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out006.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    aDecSample->WaitEOS();
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest007
 * @tc.name      : test audioDecorder config -> configErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest007
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest007, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out007.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest008
 * @tc.name      : test audioDecorder create -> prepareErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest008
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest008, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out008.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
       struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest009
 * @tc.name      : test audioDecorder start -> prepareErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest009
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest009, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out009.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Prepare());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest010
 * @tc.name      : test audioDecorder flush -> prepareErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest010
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest010, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out010.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Prepare());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest011
 * @tc.name      : test audioDecorder eos -> prepareErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest011
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest011, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out011.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    aDecSample->WaitEOS();
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest012
 * @tc.name      : test audioDecorder stop -> prepareErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest012
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest012, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out012.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest013
 * @tc.name      : test audioDecorder reset -> prepareErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest013
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest013, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out013.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest014
 * @tc.name      : test audioDecorder prepare -> prepareErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest014
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest014, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out014.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest015
 * @tc.name      : test audioDecorder create -> startErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest015
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest015, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out015.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Start());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest016
 * @tc.name      : test audioDecorder config -> startErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest016
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest016, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out016.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Start());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest018
 * @tc.name      : test audioDecorder start -> startErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest018
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest018, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out018.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest019
 * @tc.name      : test audioDecorder eos -> startErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest019
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest019, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out019.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    aDecSample->WaitEOS();
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Start());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest020
 * @tc.name      : test audioDecorder reset -> startErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest020
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest020, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out020.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Start());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest021
 * @tc.name      : test audioDecorder create -> flushErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest021
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest021, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out021.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest022
 * @tc.name      : test audioDecorder config -> flushErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest022
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest022, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out022.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest023
 * @tc.name      : test audioDecorder prepare -> flushErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest023
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest023, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out023.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest024
 * @tc.name      : test audioDecorder stop -> flushErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest024
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest024, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out024.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest025
 * @tc.name      : test audioDecorder reset -> flushErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest025
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest025, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out025.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest026
 * @tc.name      : test audioDecorder flush -> flushErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest026
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest026, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out026.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 300){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Flush());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest027
 * @tc.name      : test audioDecorder create -> stopErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest027
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest027, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out027.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest028
 * @tc.name      : test audioDecorder config -> stopErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest028
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest028, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out028.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest029
 * @tc.name      : test audioDecorder prepare -> stopErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest029
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest029, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out029.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest030
 * @tc.name      : test audioDecorder stop -> stopErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest030
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest030, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out030.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}

/**
 * @tc.number    : ActsAudioDecoderNdkReliablityTest031
 * @tc.name      : test audioDecorder reset -> stopErr
 * @tc.desc      : ActsAudioDecoderNdkReliablityTest031
 */
HWTEST_F(ActsAudioDecoderNdkTest, ActsAudioDecoderNdkReliablityTest031, Function | MediumTest | Level2)
{
    ADecNdkSample *aDecSample = new ADecNdkSample();
    aDecSample->init("/data/media/AAC_48000_32_1_rel_out031.es", ES_AAC_48000_32_1, ES_LEN_AAC_48000_32_1);
    struct OH_AVCodec* audDec = aDecSample->CreateAudioDecoder();
    ASSERT_NE(nullptr, audDec);

    OH_AVFormat *AudioFormat = OH_AVFormat_Create();
    ASSERT_NE(nullptr, AudioFormat);
    aDecSample->SetFormat(AudioFormat, AudioDecParam);

    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Reset());
    ASSERT_EQ(AV_ERR_OPERATE_NOT_PERMIT, aDecSample->Stop());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Configure(AudioFormat));
    ASSERT_EQ(AV_ERR_OK, aDecSample->Prepare());
    ASSERT_EQ(AV_ERR_OK, aDecSample->Start());
    while(aDecSample->GetFrameCount() < 500){};
    ASSERT_EQ(AV_ERR_OK, aDecSample->Release());
    audDec = nullptr;
    OH_AVFormat_Destroy(AudioFormat);
    AudioFormat = nullptr;
}
